summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-01-19 16:56:10 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-01-19 16:56:10 +0000
commit2b03d0051f94734e96bc589ba67372e385cd22f8 (patch)
tree92e7600ad7b7bf3da890de245d89a1db9ec4fc86 /lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
parentc7645e860af4b88690f740b6e312356b49b656b4 (diff)
downloadllvm-2b03d0051f94734e96bc589ba67372e385cd22f8.tar.gz
llvm-2b03d0051f94734e96bc589ba67372e385cd22f8.tar.bz2
llvm-2b03d0051f94734e96bc589ba67372e385cd22f8.tar.xz
InstCombine: Hoist 3 copies of AddOne/SubOne into a header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineAndOrXor.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineAndOrXor.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index c520db597c..a2875e2f53 100644
--- a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -20,16 +20,6 @@
using namespace llvm;
using namespace PatternMatch;
-
-/// AddOne - Add one to a ConstantInt.
-static Constant *AddOne(ConstantInt *C) {
- return ConstantInt::get(C->getContext(), C->getValue() + 1);
-}
-/// SubOne - Subtract one from a ConstantInt.
-static Constant *SubOne(ConstantInt *C) {
- return ConstantInt::get(C->getContext(), C->getValue()-1);
-}
-
/// isFreeToInvert - Return true if the specified value is free to invert (apply
/// ~ to). This happens in cases where the ~ can be eliminated.
static inline bool isFreeToInvert(Value *V) {