@@ -522,9 +522,6 @@ MipsTargetLowering::MipsTargetLowering(const MipsTargetMachine &TM,
522522
523523 setOperationAction (ISD::TRAP, MVT::Other, Legal);
524524
525- setOperationAction (ISD::ConstantFP, MVT::f32 , Custom);
526- setOperationAction (ISD::ConstantFP, MVT::f64 , Custom);
527-
528525 setTargetDAGCombine ({ISD::SDIVREM, ISD::UDIVREM, ISD::SELECT, ISD::AND,
529526 ISD::OR, ISD::ADD, ISD::SUB, ISD::AssertZext, ISD::SHL,
530527 ISD::SIGN_EXTEND});
@@ -1360,8 +1357,6 @@ LowerOperation(SDValue Op, SelectionDAG &DAG) const
13601357 case ISD::FP_TO_SINT: return lowerFP_TO_SINT (Op, DAG);
13611358 case ISD::READCYCLECOUNTER:
13621359 return lowerREADCYCLECOUNTER (Op, DAG);
1363- case ISD::ConstantFP:
1364- return lowerConstantFP (Op, DAG);
13651360 }
13661361 return SDValue ();
13671362}
@@ -3019,30 +3014,6 @@ SDValue MipsTargetLowering::lowerFP_TO_SINT(SDValue Op,
30193014 return DAG.getNode (ISD::BITCAST, SDLoc (Op), Op.getValueType (), Trunc);
30203015}
30213016
3022- SDValue MipsTargetLowering::lowerConstantFP (SDValue Op,
3023- SelectionDAG &DAG) const {
3024- SDLoc DL (Op);
3025- EVT VT = Op.getSimpleValueType ();
3026- SDNode *N = Op.getNode ();
3027- ConstantFPSDNode *CFP = cast<ConstantFPSDNode>(N);
3028-
3029- if (!CFP->isNaN () || Subtarget.isNaN2008 ()) {
3030- return SDValue ();
3031- }
3032-
3033- APFloat NaNValue = CFP->getValueAPF ();
3034- auto &Sem = NaNValue.getSemantics ();
3035-
3036- // The MSB of the mantissa should be zero for QNaNs in the MIPS legacy NaN
3037- // encodings, and one for sNaNs. Check every NaN constants and make sure
3038- // they are correctly encoded for legacy encodings.
3039- if (!NaNValue.isSignaling ()) {
3040- APFloat RealQNaN = NaNValue.getSNaN (Sem);
3041- return DAG.getConstantFP (RealQNaN, DL, VT);
3042- }
3043- return SDValue ();
3044- }
3045-
30463017// ===----------------------------------------------------------------------===//
30473018// Calling Convention Implementation
30483019// ===----------------------------------------------------------------------===//
0 commit comments