mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-08 13:00:50 +00:00
fix an oversight caught by Frits!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122204 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
48461f6da3
commit
f2a97ed13d
@ -1151,6 +1151,7 @@ Instruction *InstCombiner::visitExtractValueInst(ExtractValueInst &EV) {
|
||||
// If the normal result of the add is dead, and the RHS is a constant,
|
||||
// we can transform this into a range comparison.
|
||||
// overflow = uadd a, -4 --> overflow = icmp ugt a, 3
|
||||
if (II->getIntrinsicID() == Intrinsic::uadd_with_overflow)
|
||||
if (ConstantInt *CI = dyn_cast<ConstantInt>(II->getArgOperand(1)))
|
||||
return new ICmpInst(ICmpInst::ICMP_UGT, II->getArgOperand(0),
|
||||
ConstantExpr::getNot(CI));
|
||||
|
Loading…
Reference in New Issue
Block a user