mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Undo Chris' last patch, it caused a regression.
llvm-svn: 30991
This commit is contained in:
parent
1cf362ec18
commit
c6aa794a41
@ -1970,10 +1970,10 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) {
|
||||
return BinaryOperator::createAnd(Op0, NewNot);
|
||||
}
|
||||
|
||||
// -(X sdiv C) -> (X sdiv -C)
|
||||
// 0 - (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));
|
||||
|
Loading…
Reference in New Issue
Block a user