
#15864: Fix Int8#, Int16#, Word8#, Word16# tests under LLVM code generator -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.6.1 (LLVM) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Unfortunately it looks like LLVM doesn't like that we use `bitcast` to narrow integers. E.g. `CmpWord8` currently fails with: {{{ =====> CmpWord8(llvm) 18 of 23 [0, 6, 0] cd "primops/should_run/CmpWord8.run" && "/mnt/work/ghc/ghc- compare-1/inplace/test spaces/ghc-stage2" -o CmpWord8 CmpWord8.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed- specialisations -fshow-warning-groups -fdiagnostics-color=never -fno- diagnostics-show-caret -Werror=compat -dno-debug-output -fllvm Compile failed (exit code 1) errors were: [1 of 1] Compiling Main ( CmpInt8.hs, CmpInt8.o ) opt: /run/user/1000/ghc32287_0/ghc_2.ll:14549:20: error: invalid cast opcode for cast from 'i64' to 'i8' %ln6uE = bitcast i64 %ln6uD to i8 ^ `opt' failed in phase `LLVM Optimiser'. (Exit code: 1) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15864 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler