[llvm] [LoopVectorize] Vectorize select-cmp reduction pattern for increasing integer induction variable (PR #67812)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 00:07:53 PDT 2024
================
@@ -900,6 +993,11 @@ bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop,
<< *Phi << "\n");
return true;
}
+ if (AddReductionVar(Phi, RecurKind::IFindLastIV, TheLoop, FMF, RedDes, DB, AC,
----------------
Mel-Chen wrote:
Good question. We don't need to call `AddReductionVar` again for FFindLastIV.
This is because at the end of function `isFindLastIVPattern`, IFindLastIV can be transformed into FFindLastIV if the predicate is an fcmp instruction.
https://github.com/llvm/llvm-project/pull/67812
More information about the llvm-commits
mailing list