summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-06-16 04:55:52 +0000
committerChris Lattner <sabre@nondot.org>2005-06-16 04:55:52 +0000
commit89dc4f16f57f4d8dd714a6c6d404724356dfd1ae (patch)
treed75d7187d9d211a0b3e248a216eca7cd3560ec8f /llvm/lib/Transforms
parent69d21ed7072eb50800cd13c0927e5d0865b7a0b5 (diff)
downloadbcm5719-llvm-89dc4f16f57f4d8dd714a6c6d404724356dfd1ae.tar.gz
bcm5719-llvm-89dc4f16f57f4d8dd714a6c6d404724356dfd1ae.zip
Fix PR583 and testcase Transforms/InstCombine/2005-06-15-DivSelectCrash.ll
llvm-svn: 22227
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 ef39589008e..76f11a52b28 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -1067,7 +1067,7 @@ Instruction *InstCombiner::visitDiv(BinaryOperator &I) {
I.setOperand(1, SFO);
return &I;
} else if (SFO->getValue() == 0) {
- I.setOperand(2, STO);
+ I.setOperand(1, STO);
return &I;
}
OpenPOWER on IntegriCloud