1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

Don't rebuild RHSNeg. Just use the one that's already there.

llvm-svn: 60370
This commit is contained in:
Bill Wendling 2008-12-01 21:06:30 +00:00
parent d436da480d
commit 33f3e77a5b

View File

@ -2937,8 +2937,7 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) {
if (RHS != RHSNeg) { // Check that there is no overflow.
Constant *CINeg = ConstantExpr::getNeg(CI);
if (CI != CINeg) // Check that there is no overflow.
return BinaryOperator::CreateSDiv(LHSNeg,
ConstantExpr::getNeg(RHS));
return BinaryOperator::CreateSDiv(LHSNeg, RHSNeg);
}
}
}