InstCombine: Hoist 3 copies of AddOne/SubOne into a header.
[oota-llvm.git] / lib / Transforms / InstCombine / InstCombineCompares.cpp
index b6cdf640b009ecf6a9fa22e4979f8b95c04a0ea1..3bc8ad3c8c403a841e2a457524067b445fe2e87a 100644 (file)
@@ -28,15 +28,6 @@ static ConstantInt *getOne(Constant *C) {
   return ConstantInt::get(cast<IntegerType>(C->getType()), 1);
 }
 
-/// AddOne - Add one to a ConstantInt
-static Constant *AddOne(Constant *C) {
-  return ConstantExpr::getAdd(C, ConstantInt::get(C->getType(), 1));
-}
-/// SubOne - Subtract one from a ConstantInt
-static Constant *SubOne(Constant *C) {
-  return ConstantExpr::getSub(C, ConstantInt::get(C->getType(), 1));
-}
-
 static ConstantInt *ExtractElement(Constant *V, Constant *Idx) {
   return cast<ConstantInt>(ConstantExpr::getExtractElement(V, Idx));
 }