
#13518: CMM compiles with 8.0.2, fails with git HEAD
-------------------------------------+-------------------------------------
Reporter: erikd | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 8.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Other
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
I'm trying to implement `Float` <-> `Word32` bit casts (`Double` <->
`Word64` works fine) in CMM using:
{{{
stg_word32ToFloatzh(I32 w)
{
F_ f;
P_ ptr;
STK_CHK_GEN_N (FLOAT_STACK_WDS);
reserve FLOAT_STACK_WDS = ptr {
I32[ptr] = w;
f = F_[ptr];
}
return (f);
}
stg_floatToWord32zh(F_ f)
{
I32 w;
P_ ptr;
STK_CHK_GEN_N (FLOAT_STACK_WDS);
reserve FLOAT_STACK_WDS = ptr {
I32[ptr] = f;
w = I32[ptr];
}
return (w);
}
}}}
This compiles correctly and passes all tests with ghc 8.0.2, but compiling
the above CMM with git HEAD (currently 1e58efb16f7) results in:
{{{
Cmm lint error:
in basic block cq
in assignment:
_cj::I32 = R1;
Reg ty: I32
Rhs ty: I64
Program was:
{offset
cq: // global
_cj::I32 = R1;
//tick src