summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
commit170ed7b6a3c2060aab636a1c9dffafce9ff353a2 (patch)
treeda278b1805f7835bde09a7d5d53c95dc46dc7885 /llvm/lib/Transforms
parent86498988e0cb40fc7e1073d40030efd95a9d04da (diff)
downloadbcm5719-llvm-170ed7b6a3c2060aab636a1c9dffafce9ff353a2.tar.gz
bcm5719-llvm-170ed7b6a3c2060aab636a1c9dffafce9ff353a2.zip
Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
llvm-svn: 2627
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 0812fca6e97..b6727d5f9e0 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud