mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-25 13:08:00 +00:00
Don't make TwoToExp signed by default.
llvm-svn: 60279
This commit is contained in:
parent
4e018f4c22
commit
115290ddd3
@ -2960,8 +2960,7 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) {
|
||||
APInt RHSNegAPI(RHSNeg->getBitWidth(), RHSNeg->getSExtValue(), true);
|
||||
|
||||
APInt NegOne = -APInt(RHSNeg->getBitWidth(), 1, true);
|
||||
APInt TwoToExp(RHSNeg->getBitWidth(), 1 << (RHSNeg->getBitWidth() - 1),
|
||||
true);
|
||||
APInt TwoToExp(RHSNeg->getBitWidth(), 1 << (RHSNeg->getBitWidth() - 1));
|
||||
|
||||
// -X/C -> X/-C, if and only if negation doesn't overflow.
|
||||
if ((RHS->getSExtValue() < 0 && RHSNegAPI.slt(TwoToExp - 1)) ||
|
||||
|
Loading…
Reference in New Issue
Block a user