[GHC] #14619: Output value of program changes upon compiling with -O optimizations

GHC ghc-devs at haskell.org
Sat Jan 27 22:45:34 UTC 2018


#14619: Output value of program changes upon compiling with -O optimizations
-------------------------------------+-------------------------------------
        Reporter:  sheaf             |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:  x86_64
 Type of failure:  Incorrect result  |  (amd64)
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by AndreasK):

 When checking for invalidated registers we use callClobberedRegs.

 However this is the definition for Windows:

 {{{
  | platformOS platform == OSMinGW32
    = [rax,rcx,rdx,r8,r9,r10,r11]
    ++ map regSingle (floatregnos platform)
 }}}

 Which just lists ALL floating point registers.

 Instead we should use the information provided in CodeGen.Platform to
 check if they are callee-saved or not and let good things happen.

 I will put a patch up in the next few days.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14619#comment:35>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list