[llvm-dev] lower 64 bits constant

Tim Northover via llvm-dev
Wed, 02 Dec 2015 18:36:02 -0000

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.