[llvm] [LV] Vectorize conditional scalar assignments (PR #158088)

Graham Hunter via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 26 09:13:35 PST 2025


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

done, though unifying the detection code required a few more changes.

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


More information about the llvm-commits mailing list