[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:05:32 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 &&
----------------
SergeyShch01 wrote:

 I added a partial_alias negative case using -force-partial-aliasing-vectorization. It checks that no cross-part profitability estimate or selection is emitted and that the final plan uses UF=1. A positive loop in the same input verifies that the feature is otherwise active.

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


More information about the llvm-commits mailing list