[llvm-dev] lower 64 bits constant

Xiangyang Guo via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 2 11:57:49 PST 2015


Thanks, Tim.

"setOperationAction(ISD::ConstantFP, MVT::f64, Legal)" and some
modification of "LowerOperand" and "printOperand" make this lowering
"double" works.

Regards,

Xiangyang

2015-12-02 13:36 GMT-05:00 Tim Northover <t.p.northover at gmail.com>:

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151202/8af14179/attachment.html>


More information about the llvm-dev mailing list