Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.
[oota-llvm.git] / include / llvm / InstrTypes.h
index b27863b53b6896314fcfa7f739057142198c84eb..72cca198ddb58851cc609d6cd2151af37fd04c86 100644 (file)
@@ -200,19 +200,19 @@ public:
   static BinaryOperator *CreateNSWAdd(Value *V1, Value *V2,
                                       const Twine &Name = "") {
     BinaryOperator *BO = CreateAdd(V1, V2, Name);
-    cast<AddOperator>(BO)->setHasNoSignedWrap(true);
+    BO->setHasNoSignedWrap(true);
     return BO;
   }
   static BinaryOperator *CreateNSWAdd(Value *V1, Value *V2,
                                       const Twine &Name, BasicBlock *BB) {
     BinaryOperator *BO = CreateAdd(V1, V2, Name, BB);
-    cast<AddOperator>(BO)->setHasNoSignedWrap(true);
+    BO->setHasNoSignedWrap(true);
     return BO;
   }
   static BinaryOperator *CreateNSWAdd(Value *V1, Value *V2,
                                       const Twine &Name, Instruction *I) {
     BinaryOperator *BO = CreateAdd(V1, V2, Name, I);
-    cast<AddOperator>(BO)->setHasNoSignedWrap(true);
+    BO->setHasNoSignedWrap(true);
     return BO;
   }
 
@@ -221,19 +221,19 @@ public:
   static BinaryOperator *CreateExactSDiv(Value *V1, Value *V2,
                                          const Twine &Name = "") {
     BinaryOperator *BO = CreateSDiv(V1, V2, Name);
-    cast<SDivOperator>(BO)->setIsExact(true);
+    BO->setIsExact(true);
     return BO;
   }
   static BinaryOperator *CreateExactSDiv(Value *V1, Value *V2,
                                          const Twine &Name, BasicBlock *BB) {
     BinaryOperator *BO = CreateSDiv(V1, V2, Name, BB);
-    cast<SDivOperator>(BO)->setIsExact(true);
+    BO->setIsExact(true);
     return BO;
   }
   static BinaryOperator *CreateExactSDiv(Value *V1, Value *V2,
                                          const Twine &Name, Instruction *I) {
     BinaryOperator *BO = CreateSDiv(V1, V2, Name, I);
-    cast<SDivOperator>(BO)->setIsExact(true);
+    BO->setIsExact(true);
     return BO;
   }
 
@@ -287,6 +287,21 @@ public:
   ///
   bool swapOperands();
 
+  /// setHasNoUnsignedWrap - Set or clear the nsw flag on this instruction,
+  /// which must be an operator which supports this flag. See LangRef.html
+  /// for the meaning of this flag.
+  void setHasNoUnsignedWrap(bool);
+
+  /// setHasNoSignedWrap - Set or clear the nsw flag on this instruction,
+  /// which must be an operator which supports this flag. See LangRef.html
+  /// for the meaning of this flag.
+  void setHasNoSignedWrap(bool);
+
+  /// setIsExact - Set or clear the exact flag on this instruction,
+  /// which must be an operator which supports this flag. See LangRef.html
+  /// for the meaning of this flag.
+  void setIsExact(bool);
+
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const BinaryOperator *) { return true; }
   static inline bool classof(const Instruction *I) {