[llvm] [LV] Add cross-part load overlap heuristic for interleaving (PR #214500)
Sergey Shcherbinin via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 07:02:35 PDT 2026
================
@@ -3630,9 +3649,53 @@ std::unique_ptr<VPlan> LoopVectorizationPlanner::selectBestEpiloguePlan(
return Clone;
}
+bool LoopVectorizationPlanner::shouldUseCrossPartCSE() const {
+ // Keep the disabled path free of policy queries and cost-map allocation.
+ if (!EnableInterleaveCSE)
+ return false;
+ return OrigLoop->isInnermost() && Config.getHints().getInterleave() == 0 &&
+ !CM->maskPartialAliasing();
+}
+
+bool LoopVectorizationPlanner::shouldCollectCrossPartCSECosts(
+ VPlan &Plan, ElementCount VF) const {
+ return shouldUseCrossPartCSE() && VF.isVector() && !VF.isScalable() &&
----------------
SergeyShch01 wrote:
The restriction is now removed, with positive and negative scalable forward/reverse tests added.
https://github.com/llvm/llvm-project/pull/214500
More information about the llvm-commits
mailing list