Skip to content

Commit

Permalink
[InstCombine] Fix comment from #88193 (NFC) (#91427)
Browse files Browse the repository at this point in the history
It is inaccurate and needs to be corrected.
  • Loading branch information
AZero13 authored May 9, 2024
1 parent 1aaab33 commit 409ff97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ Instruction *InstCombinerImpl::visitLShr(BinaryOperator &I) {
match(Op1, m_SpecificIntAllowPoison(BitWidth - 1)))
return new ZExtInst(Builder.CreateIsNotNeg(X, "isnotneg"), Ty);

// ((X << nuw Z) sub nuw Y) >>u exact Z --> X sub nuw (Y >>u exact Z),
// ((X << nuw Z) sub nuw Y) >>u exact Z --> X sub nuw (Y >>u exact Z)
Value *Y;
if (I.isExact() &&
match(Op0, m_OneUse(m_NUWSub(m_NUWShl(m_Value(X), m_Specific(Op1)),
Expand All @@ -1279,7 +1279,7 @@ Instruction *InstCombinerImpl::visitLShr(BinaryOperator &I) {
case Instruction::And:
case Instruction::Or:
case Instruction::Xor:
// And does not work here, and sub is handled separately.
// Sub is handled separately.
return true;
}
};
Expand Down

0 comments on commit 409ff97

Please sign in to comment.