[llvm] [LV] Support conditional scalar assignments of masked operations (PR #178862)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 5 06:30:40 PST 2026


================
@@ -473,9 +499,19 @@ bool RecurrenceDescriptor::AddReductionVar(
         !isAnyOfRecurrenceKind(Kind) && hasMultipleUsesOf(Cur, VisitedInsts, 1))
       return false;
 
-    // All inputs to a PHI node must be a reduction value.
-    if (IsAPhi && Cur != Phi && !areAllUsesIn(Cur, VisitedInsts))
-      return false;
+    if (IsAPhi && Cur != Phi) {
+      if (!areAllUsesIn(Cur, VisitedInsts)) {
----------------
MacDue wrote:

I do after `if (!FoundFindLastLikePhi)`

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


More information about the llvm-commits mailing list