[llvm-commits] [llvm] r71175 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Dan Gohman
gohman at apple.com
Thu May 7 12:43:39 PDT 2009
Author: djg
Date: Thu May 7 14:43:39 2009
New Revision: 71175
URL: http://llvm.org/viewvc/llvm-project?rev=71175&view=rev
Log:
Perform constant folding on operands of instructions with non-void
types, such as loads and calls.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=71175&r1=71174&r2=71175&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 7 14:43:39 2009
@@ -12770,7 +12770,9 @@
continue;
}
- if (TD && I->getType()->getTypeID() == Type::VoidTyID) {
+ if (TD &&
+ (I->getType()->getTypeID() == Type::VoidTyID ||
+ I->isTrapping())) {
// 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))
More information about the llvm-commits
mailing list