diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-07-15 22:13:34 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-07-15 22:13:34 +0000 |
commit | ebe66ab13b88d20ae99c78f934eb514391d62d28 (patch) | |
tree | 2a67eef8d931e015767d07942626220bc230926b /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | f3e1e4d9a1b5dd9f05b3fbaa90520db57e7b7684 (diff) | |
download | bcm5719-llvm-ebe66ab13b88d20ae99c78f934eb514391d62d28.tar.gz bcm5719-llvm-ebe66ab13b88d20ae99c78f934eb514391d62d28.zip |
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.
llvm-svn: 75845
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 4160ee7dc1e..fd87e30f963 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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)) |