[llvm] [LoopVectorize] Vectorize select-cmp reduction pattern for increasing integer induction variable (PR #67812)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 26 06:52:21 PDT 2024


================
@@ -900,6 +991,11 @@ bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop,
                       << *Phi << "\n");
     return true;
   }
+  if (AddReductionVar(Phi, RecurKind::IFindLastIV, TheLoop, FMF, RedDes, DB, AC,
+                      DT, SE)) {
+    LLVM_DEBUG(dbgs() << "Found a FindLastIV reduction PHI." << *Phi << "\n");
----------------
david-arm wrote:

It might be a good idea to indicate whether we've matched IFindLastIV or FFindLastIV because `FindLastIV` doesn't tell you which one.

https://github.com/llvm/llvm-project/pull/67812


More information about the llvm-commits mailing list