projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32b5d71
)
fix a buggy check that accidentally disabled this xform
author
Chris Lattner
<sabre@nondot.org>
Sun, 15 Oct 2006 22:42:15 +0000
(22:42 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 15 Oct 2006 22:42:15 +0000
(22:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30967
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index 739493e2740daf54c1ed26a26c2d4c2794f33a72..6654daff37d0f3ac5d805a0d905898565ccb456d 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-1973,7
+1973,7
@@
Instruction *InstCombiner::visitSub(BinaryOperator &I) {
// -(X sdiv C) -> (X sdiv -C)
if (Op1I->getOpcode() == Instruction::Div)
if (ConstantSInt *CSI = dyn_cast<ConstantSInt>(Op0))
- if (CSI->isNullValue())
+ if (
!
CSI->isNullValue())
if (Constant *DivRHS = dyn_cast<Constant>(Op1I->getOperand(1)))
return BinaryOperator::createDiv(Op1I->getOperand(0),
ConstantExpr::getNeg(DivRHS));