propagate IR-level fast-math-flags to DAG nodes; 2nd try; NFC
[oota-llvm.git] / lib / CodeGen / SelectionDAG / TargetLowering.cpp
index 38e39e52e81a1c79338ecce29f665f789baa51d4..70d04c025804b50145b2f6b6ee848c656cd21117 100644 (file)
@@ -2660,8 +2660,9 @@ SDValue TargetLowering::BuildExactSDIV(SDValue Op1, SDValue Op2, SDLoc dl,
     // TODO: For UDIV use SRL instead of SRA.
     SDValue Amt =
         DAG.getConstant(ShAmt, dl, getShiftAmountTy(Op1.getValueType()));
-    Op1 = DAG.getNode(ISD::SRA, dl, Op1.getValueType(), Op1, Amt, false, false,
-                      true);
+    SDNodeFlags Flags;
+    Flags.setExact(true);
+    Op1 = DAG.getNode(ISD::SRA, dl, Op1.getValueType(), Op1, Amt, &Flags);
     d = d.ashr(ShAmt);
   }