aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-14 16:44:07 +0000
committerChris Lattner <sabre@nondot.org>2002-05-14 16:44:07 +0000
commit86c25fd5560dd9df92ccfd37ffa2dba1a007eeae (patch)
tree1948e4d9e9a4790cd7295638c4f0bc0cc7d1984e /lib
parentcdece545dd24fbfc67a4651477eedf6ebde03303 (diff)
Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2627 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 0812fca6e9..b6727d5f9e 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -187,7 +187,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator *I) {
// not used by anyone else...
//
if (BinaryOperator *Op1I = dyn_cast<BinaryOperator>(Op1))
- if (Op1I->use_size() == 1) {
+ if (Op1I->use_size() == 1 && Op1I->getOpcode() == Instruction::Sub) {
// Swap the two operands of the subexpr...
Value *IIOp0 = Op1I->getOperand(0), *IIOp1 = Op1I->getOperand(1);
Op1I->setOperand(0, IIOp1);