aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-07-15 22:13:34 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-07-15 22:13:34 +0000
commitfd2934f190fc13b60f8e5dd9639008d721b170f8 (patch)
tree016bf4fc8d33ec33dcdc6ad4fe5f705233d82622 /lib/Transforms
parentf05522974b3c1b9dc2644831364e19d5132e751b (diff)
Don't restrict the set of instructions where we try to constant-fold the
operands; it's possible to end up with a constant-foldable operand to most instructions, even those which can't trap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 4160ee7dc1..fd87e30f96 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -13021,9 +13021,7 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
continue;
}
- if (TD &&
- (I->getType()->getTypeID() == Type::VoidTyID ||
- I->isTrapping())) {
+ if (TD) {
// See if we can constant fold its operands.
for (User::op_iterator i = I->op_begin(), e = I->op_end(); i != e; ++i)
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(i))