[InstCombine] fix code comment to match code; NFC

This commit is contained in:
Sanjay Patel 2021-11-09 13:26:04 -05:00
parent 65fceaebc7
commit d5c002bdc7
1 changed files with 1 additions and 1 deletions

View File

@ -2175,7 +2175,7 @@ Instruction *InstCombinerImpl::visitSub(BinaryOperator &I) {
return replaceInstUsesWith( return replaceInstUsesWith(
I, Builder.CreateIntrinsic(Intrinsic::usub_sat, {Ty}, {X, Op1})); I, Builder.CreateIntrinsic(Intrinsic::usub_sat, {Ty}, {X, Op1}));
// Op0 - umax(X, Op0) --> 0 - usub.sat(X, Op1) // Op0 - umax(X, Op0) --> 0 - usub.sat(X, Op0)
if (match(Op1, m_OneUse(m_c_UMax(m_Value(X), m_Specific(Op0))))) { if (match(Op1, m_OneUse(m_c_UMax(m_Value(X), m_Specific(Op0))))) {
Value *USub = Builder.CreateIntrinsic(Intrinsic::usub_sat, {Ty}, {X, Op0}); Value *USub = Builder.CreateIntrinsic(Intrinsic::usub_sat, {Ty}, {X, Op0});
return BinaryOperator::CreateNeg(USub); return BinaryOperator::CreateNeg(USub);