LLVM backend does not properly widen certain literal types in call expressions
Related to #7571 (closed) and #7574 (closed), while compiling stage2 with stage1 GHC HEAD on my ODROID, my build fails in libraries/base/GHC/Word.hs with:
linaro@linaro-ubuntu-desktop ~/code/ghc
% "inplace/bin/ghc-stage1" -static -H64m -O0 -fasm -package-name base-4.7.0.0 -hide-all-packages -i -ilibraries/base/. -ilibrarie-Ilibraries/base/dist-install/build -Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include -optP-DOPTIMISE_INTEGER_GCDl_macros.h -package ghc-prim-0.3.1.0 -package integer-gmp-0.5.1.0 -package rts-1.0 -package-name base -XHaskell98 -XCPP -O -fasm -no -hidir libraries/base/dist-install/build -stubdir libraries/base/dist-install/build -hisuf hi -osuf o -hcsuf hc -c libraries/base/./files -tmpdir tmpdir
when making flags consistent: Warning:
No native code generator, so using LLVM
You are using a new version of LLVM that hasn't been tested yet!
We will try though...
/home/linaro/bin/opt: tmpdir/ghc12774_0/ghc12774_0.ll:26765:62: error: argument is not of expected type 'i64'
%lnhvj = call ccc i32 (i64,i64)* @hs_eqWord64( i64 %lnhvi, i32 0 ) nounwind
The declaration of ```hs_eqWord64` is:
{{{ declare ccc i32 @hs_eqWord64(i64, i64) align 4 }}}
And we get:
{{{ %lnhvj = call ccc i32 (i64,i64)* @hs_eqWord64( i64 %lnhvi, i32 0 ) nounwind }}}
inside of c8Aq_info, which has a tail call from the symbol base_GHCziWord_zdfNumWord64zuzdcsignum_info or ```base_GHC.Word_fNumWord64_csignum_info\` - this would seem to be some specialized instance of the case:
instance Num Word64 where
...
signum 0 = 0
signum _ = 1
- .. I think. This seems like a fairly simple fix similar to the others, but I'm filing it for now.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | dterei, simonmar |
| Operating system | Unknown/Multiple |
| Architecture | Unknown/Multiple |