summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
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
commitfda5dc4968e6a4a7e17c8a68b18f6a2cb735b69f (patch)
treeb6d6e7139f4c31fc5498103429fa99900d38b40f /llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
parent097984480d5782367b61e4000324e507a7d95d64 (diff)
downloadbcm5719-llvm-fda5dc4968e6a4a7e17c8a68b18f6a2cb735b69f.tar.gz
bcm5719-llvm-fda5dc4968e6a4a7e17c8a68b18f6a2cb735b69f.zip
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". llvm-svn: 131798
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index ea0ffd9c340..243937705ac 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/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:
OpenPOWER on IntegriCloud