[llvm-dev] lower 64 bits constant

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 2 10:36:02 PST 2015


On 2 December 2015 at 10:30, Xiangyang Guo via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> GRWideRegs can be f64 and i64. However, the 'const-long' works while the
> 'const-double' doesn't work. From the -debug log, it seems "f64 =
> ConstantFP" is replaced by "f64,ch = load" and this is where the error
> happens. Can anyone tell me why this happens and how to make this work?

It's probably being lowered to a litpool load by default. You need to
call "setOperationAction(ISD::ConstantFP, MVT::f64, Legal)" in
ISelLowering.cpp.

Cheers.

Tim.


More information about the llvm-dev mailing list