diff options
author | Dan Gohman <gohman@apple.com> | 2009-12-18 02:58:50 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-12-18 02:58:50 +0000 |
commit | bdc46c6af5ffcf3596a72df75880fe8703436060 (patch) | |
tree | d85a0303352cc1f8bbf93e8e4e1ee1affb7506b7 /include/llvm/InstrTypes.h | |
parent | 2df72c144164cbb06e505f3af506e1bb69053e73 (diff) | |
download | external_llvm-bdc46c6af5ffcf3596a72df75880fe8703436060.zip external_llvm-bdc46c6af5ffcf3596a72df75880fe8703436060.tar.gz external_llvm-bdc46c6af5ffcf3596a72df75880fe8703436060.tar.bz2 |
Add utility routines for creating integer negation operators with NSW set.
Integer negation only overflows with INT_MIN, but that's an important case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/InstrTypes.h')
-rw-r--r-- | include/llvm/InstrTypes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index bc89969..b252902 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -308,6 +308,10 @@ public: Instruction *InsertBefore = 0); static BinaryOperator *CreateNeg(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); + static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name = "", + Instruction *InsertBefore = 0); + static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name, + BasicBlock *InsertAtEnd); static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name = "", Instruction *InsertBefore = 0); static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name, |