[llvm] [VPlan] Chose between FOR and predicated IV in createHeaderPhiRecipes. (PR #201208)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 02:04:05 PDT 2026


================
@@ -870,18 +871,21 @@ bool LoopVectorizationLegality::canVectorizeInstr(Instruction &I) {
       return true;
     }
 
-    if (RecurrenceDescriptor::isFixedOrderRecurrence(Phi, TheLoop, DT)) {
+    bool IsFOR = RecurrenceDescriptor::isFixedOrderRecurrence(Phi, TheLoop, DT);
+    if (IsFOR) {
       FixedOrderRecurrences.insert(Phi);
-      return true;
     }
----------------
artagnon wrote:

```suggestion
    if (IsFOR)
FixedOrderRecurrences.insert(Phi);
```

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


More information about the llvm-commits mailing list