[llvm] [LV] Use planner's Legal in executePlan instead of CM.Legal (NFC) (PR #211600)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 12:58:59 PDT 2026


https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/211600

>From 3290af31ba23df62841c626a0385c21e84535ac6 Mon Sep 17 00:00:00 2001
From: Florian Hahn <flo at fhahn.com>
Date: Thu, 23 Jul 2026 11:33:32 +0100
Subject: [PATCH] [LV] Use planner's Legal in executePlan instead of CM.Legal
 (NFC)

Remove an unnecessary level of indirection.
---
 llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index db900cadc3a5b..2c1531e6aa146 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5929,7 +5929,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
   if (CM.maskPartialAliasing()) {
     assert(BestVPlan.hasTailFolded() && "Expected tail folding to be enabled");
     RUN_VPLAN_PASS(VPlanTransforms::materializeAliasMaskCheckBlock, BestVPlan,
-                   *CM.Legal->getRuntimePointerChecking()->getDiffChecks(),
+                   *Legal->getRuntimePointerChecking()->getDiffChecks(),
                    HasBranchWeights);
     ++LoopsPartialAliasVectorized;
   }



More information about the llvm-commits mailing list