From bdc46c6af5ffcf3596a72df75880fe8703436060 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 18 Dec 2009 02:58:50 +0000 Subject: 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 --- include/llvm/Support/NoFolder.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/llvm/Support/NoFolder.h') diff --git a/include/llvm/Support/NoFolder.h b/include/llvm/Support/NoFolder.h index 7f2f1497f3..f6f4c5b3c8 100644 --- a/include/llvm/Support/NoFolder.h +++ b/include/llvm/Support/NoFolder.h @@ -115,6 +115,9 @@ public: Value *CreateNeg(Constant *C) const { return BinaryOperator::CreateNeg(C); } + Value *CreateNSWNeg(Constant *C) const { + return BinaryOperator::CreateNSWNeg(C); + } Value *CreateNot(Constant *C) const { return BinaryOperator::CreateNot(C); } -- cgit v1.2.3