[mips] Replace FeatureFPIdx with FeatureMips4_32r2
[oota-llvm.git] / lib / Target / Mips / Mips16ISelDAGToDAG.cpp
index 92b9e6d74f1a68b71d71f5383bc0b957d687f0ac..4e86a27e323c6c9aa688c860d381ddf9ea87d280 100644 (file)
@@ -225,10 +225,12 @@ bool Mips16DAGToDAGISel::selectAddr16(
     // If an indexed floating point load/store can be emitted, return false.
     const LSBaseSDNode *LS = dyn_cast<LSBaseSDNode>(Parent);
 
-    if (LS &&
-        (LS->getMemoryVT() == MVT::f32 || LS->getMemoryVT() == MVT::f64) &&
-        Subtarget.hasFPIdx())
-      return false;
+    if (LS) {
+      if (LS->getMemoryVT() == MVT::f32 && Subtarget.hasMips4_32r2())
+        return false;
+      if (LS->getMemoryVT() == MVT::f64 && Subtarget.hasMips4_32r2())
+        return false;
+    }
   }
   Base   = Addr;
   Offset = CurDAG->getTargetConstant(0, ValTy);