Index: include/llvm/CodeGen/SelectionDAGNodes.h =================================================================== --- include/llvm/CodeGen/SelectionDAGNodes.h +++ include/llvm/CodeGen/SelectionDAGNodes.h @@ -328,6 +328,8 @@ bool NoInfs : 1; bool NoSignedZeros : 1; bool AllowReciprocal : 1; + bool NoExceptions : 1; + bool NoRounding : 1; public: /// Default constructor turns off all optimization flags. @@ -340,6 +342,8 @@ NoInfs = false; NoSignedZeros = false; AllowReciprocal = false; + NoExceptions = false; + NoRounding = false; } // These are mutators for each flag. @@ -351,6 +355,8 @@ void setNoInfs(bool b) { NoInfs = b; } void setNoSignedZeros(bool b) { NoSignedZeros = b; } void setAllowReciprocal(bool b) { AllowReciprocal = b; } + void setNoExceptions(bool b) { NoExceptions = b; } + void setNoRounding(bool b) { NoRounding = b; } // These are accessors for each flag. bool hasNoUnsignedWrap() const { return NoUnsignedWrap; } @@ -361,13 +367,16 @@ bool hasNoInfs() const { return NoInfs; } bool hasNoSignedZeros() const { return NoSignedZeros; } bool hasAllowReciprocal() const { return AllowReciprocal; } + bool hasNoExceptions() const { return NoExceptions; } + bool hasNoRounding() const { return NoRounding; } /// Return a raw encoding of the flags. /// This function should only be used to add data to the NodeID value. unsigned getRawFlags() const { return (NoUnsignedWrap << 0) | (NoSignedWrap << 1) | (Exact << 2) | (UnsafeAlgebra << 3) | (NoNaNs << 4) | (NoInfs << 5) | - (NoSignedZeros << 6) | (AllowReciprocal << 7); + (NoSignedZeros << 6) | (AllowReciprocal << 7) | + (NoExceptions << 8) | (NoRounding << 9); } }; Index: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp =================================================================== --- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -2345,6 +2345,8 @@ Flags.setNoNaNs(FMF.noNaNs()); Flags.setNoSignedZeros(FMF.noSignedZeros()); Flags.setUnsafeAlgebra(FMF.unsafeAlgebra()); + Flags.setNoExceptions(FMF.noExceptions()); + Flags.setNoRounding(FMF.noRounding()); } SDValue BinNodeValue = DAG.getNode(OpCode, getCurSDLoc(), Op1.getValueType(), Op1, Op2, &Flags);