aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-05-21 18:31:42 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-05-21 18:31:42 +0000
commitcd89d4d52443728ecbda9554bd3095324bd29162 (patch)
treef6c1a15afb55fec6d4ad6b411bf87e900116ee04 /lib/Transforms
parent81f3830f2ed0b26e8bd7ae62e127db427f9f350d (diff)
Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)"
It's better to do this in codegen, mul.with.overflow(X, 2) is more canonical because it has only one use on "X". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index ea0ffd9c34..243937705a 100644
--- a/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -535,20 +535,6 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
Constant *Struct = ConstantStruct::get(II->getContext(), V, 2, false);
return InsertValueInst::Create(Struct, II->getArgOperand(0), 0);
}
-
- // [su]mul.with.overflow(X, 2) -> [su]add.with.overflow(X, X)
- if (RHSI->equalsInt(2)) {
- Intrinsic::ID Add =
- II->getIntrinsicID() == Intrinsic::smul_with_overflow ?
- Intrinsic::sadd_with_overflow : Intrinsic::uadd_with_overflow;
-
- Module *M = II->getParent()->getParent()->getParent();
- const Type *Ty = RHSI->getType();
- Function *F = Intrinsic::getDeclaration(M, Add, &Ty, 1);
-
- Value *Ops[] = { II->getArgOperand(0), II->getArgOperand(0) };
- return CallInst::Create(F, Ops, Ops+2);
- }
}
break;
case Intrinsic::ppc_altivec_lvx: