Fix Int8#, Int16#, Word8#, Word16# tests under LLVM code generator
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)
Trac metadata
Trac field | Value |
---|---|
Version | 8.6.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (LLVM) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | michalt |
Operating system | |
Architecture |