From 2b03d0051f94734e96bc589ba67372e385cd22f8 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 19 Jan 2014 16:56:10 +0000 Subject: 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 --- lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'lib/Transforms/InstCombine/InstCombineAndOrXor.cpp') 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) { -- cgit v1.2.3