[llvm] [VPlan] Optimize FindLast of (binop %IV, live-in) by sinking. (PR #183911)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 15:13:01 PST 2026


================
@@ -5725,11 +5762,17 @@ void VPlanTransforms::optimizeFindIVReductions(VPlan &Plan,
                                     m_VPValue(FalseVal))))
       continue;
 
-    // The non-phi operand of the select is the IV.
-    assert(is_contained(CondSelect->getDefiningRecipe()->operands(), PhiR));
+    // The non-phi operand of the select is the IV (or expression of IV).
+    assert(is_contained(BackedgeVal->getDefiningRecipe()->operands(), PhiR));
----------------
fhahn wrote:

yep restored, thanks

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


More information about the llvm-commits mailing list