[llvm] [VPlan] Run initial recipe simplification on VPlan0. (PR #176828)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 11 06:06:57 PST 2026


================
@@ -2173,6 +2185,11 @@ static bool
 sinkRecurrenceUsersAfterPrevious(VPFirstOrderRecurrencePHIRecipe *FOR,
                                  VPRecipeBase *Previous,
                                  VPDominatorTree &VPDT) {
+  // If Previous is a live-in (no defining recipe), it naturally dominates all
+  // recipes in the loop, so no sinking is needed.
+  if (!Previous)
+    return true;
+
----------------
fhahn wrote:

We now may optimize away recipes that were incoming values of first-order recurrences, hence we need to account for those here.

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


More information about the llvm-commits mailing list