
#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): GHC-8.2 does mess up the register allocation/calling convention on the foreign call to sqrt. {{{ call sqrt # born: %r3 ... %r29 %r30 %r31 ... # w_dying: %r0 ... %r29 %r31 ... }}} The bad news is that there is a good chance that it only works on head because we use the sqrt assembly instruction instead which sidesteps the issue. {{{ ... sqrtsd %vSSE_s3Lt,%vSSE_c3O1 # born: %vSSE_c3O1 ... }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14619#comment:34 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler