[llvm] IVDesc: unify RecurKinds IAnyOf and FAnyOf (PR #118393)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 06:54:55 PST 2024
================
@@ -415,12 +414,9 @@ bool RecurrenceDescriptor::AddReductionVar(
if (IsAPhi && Cur != Phi && !areAllUsesIn(Cur, VisitedInsts))
return false;
- if ((isIntMinMaxRecurrenceKind(Kind) || Kind == RecurKind::IAnyOf) &&
- (isa<ICmpInst>(Cur) || isa<SelectInst>(Cur)))
- ++NumCmpSelectPatternInst;
- if ((isFPMinMaxRecurrenceKind(Kind) || Kind == RecurKind::FAnyOf) &&
- (isa<FCmpInst>(Cur) || isa<SelectInst>(Cur)))
- ++NumCmpSelectPatternInst;
+ if (isMinMaxRecurrenceKind(Kind) || isAnyOfRecurrenceKind(Kind))
+ if (match(Cur, m_Select(m_Cmp(), m_Value(), m_Value())))
+ ++NumCmpSelectPatternInst;
----------------
Mel-Chen wrote:
6f362bdd3414d153d83b4e79abedf7ab799de991
I did not encounter any lit test failures.
Could you share more details about the issues you encountered when applying this suggestion?
This information will help me better understand the problem and provide further assistance.
https://github.com/llvm/llvm-project/pull/118393
More information about the llvm-commits
mailing list