[llvm] [VPlan] Create header phi recipes after initial scalar optimizations. (PR #200920)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 08:04:43 PDT 2026
================
@@ -962,6 +966,9 @@ bool VPlanTransforms::createHeaderPhiRecipes(
if (!tryToSinkOrHoistRecurrenceUsers(HeaderVPBB, VPDT))
return false;
+ if (range_size(HeaderVPBB->phis()) !=
+ range_size(Plan.getScalarPreheader()->phis()))
+ return true;
----------------
fhahn wrote:
I added a brief comment; a header phi now may be removed/simplified early, in which case we need to skip the renaming, as we can't map header phi to scalar phi any longer. This just skips the IR naming for cases that should not really happen in practice (those phis would be cleaned up earlier)
https://github.com/llvm/llvm-project/pull/200920
More information about the llvm-commits
mailing list