[llvm] [VectorCombine] Combine adjacent loads feeding as shuffle operands (PR #213007)

Hari Limaye via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 06:32:50 PDT 2026


================
@@ -6696,10 +6906,12 @@ PreservedAnalyses VectorCombinePass::run(Function &F,
   TargetTransformInfo &TTI = FAM.getResult<TargetIRAnalysis>(F);
   DominatorTree &DT = FAM.getResult<DominatorTreeAnalysis>(F);
   AAResults &AA = FAM.getResult<AAManager>(F);
+  ScalarEvolution &SE = FAM.getResult<ScalarEvolutionAnalysis>(F);
----------------
hazzlim wrote:

Could we request `ScalarEvolution` only when `!TryEarlyFoldsOnly`? `foldShuffleOfAdjacentLoads()` is below the early-fold return, but the default early `VectorCombine` invocation now computes SCEV even though this fold won't run.


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


More information about the llvm-commits mailing list