[GHC] #8250: cgrun072 (optllvm) failing

GHC ghc-devs at haskell.org
Sat Sep 7 21:18:34 CEST 2013


#8250: cgrun072 (optllvm) failing
-------------------------------------+------------------------------------
        Reporter:  leroux            |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler (LLVM)   |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  Runtime crash     |       Difficulty:  Unknown
       Test Case:  cgrun072          |       Blocked By:
        Blocking:                    |  Related Tickets:  7902
-------------------------------------+------------------------------------

Comment (by rwbarton):

 A correction to the last bullet point in my previous comment: fixing
 `GHC.Word.byteSwap{16,32}` actually *does* matter because a user program
 built with `-O -fllvm` will inline those functions at the Haskell level,
 and then the LLVM backend will generate the wrong code for the byte-swap
 primop.
 {{{
 import GHC.Word
 main = print $ byteSwap32 (0xaabbccdd :: Word32)
 -- built with ghc -O -fllvm
 -- expected output: 3721182122
 -- actual output: -573785174
 }}}

 The cgrun072 test should test the `GHC.Word.byteSwap*` wrappers, too.

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




More information about the ghc-tickets mailing list