diff options
Diffstat (limited to 'lib/Target/Alpha/AlphaISelLowering.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaISelLowering.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/Target/Alpha/AlphaISelLowering.cpp b/lib/Target/Alpha/AlphaISelLowering.cpp index b3f865c..cb03a6f 100644 --- a/lib/Target/Alpha/AlphaISelLowering.cpp +++ b/lib/Target/Alpha/AlphaISelLowering.cpp @@ -157,11 +157,6 @@ AlphaTargetLowering::AlphaTargetLowering(TargetMachine &TM) setStackPointerRegisterToSaveRestore(Alpha::R30); - addLegalFPImmediate(APFloat(+0.0)); //F31 - addLegalFPImmediate(APFloat(+0.0f)); //F31 - addLegalFPImmediate(APFloat(-0.0)); //-F31 - addLegalFPImmediate(APFloat(-0.0f)); //-F31 - setJumpBufSize(272); setJumpBufAlignment(16); @@ -919,3 +914,13 @@ AlphaTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { // The Alpha target isn't yet aware of offsets. return false; } + +bool AlphaTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT) const { + if (VT != MVT::f32 && VT != MVT::f64) + return false; + // +0.0 F31 + // +0.0f F31 + // -0.0 -F31 + // -0.0f -F31 + return Imm.isZero() || Imm.isNegZero(); +} |