[llvm] [SLP] Avoid seeding related affine loop address computations (PR #226220)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 11 09:48:52 PDT 2026
================
@@ -36692,6 +36707,12 @@ bool SLPVectorizerPass::vectorizeGEPIndices(BasicBlock *BB, BoUpSLP &R) {
Bundle[BundleIndex++] = GEPIdx;
}
+ if (isStrengthReducibleIndexBundle(Bundle, *SE, *LI, SLPReVec)) {
+ LLVM_DEBUG(dbgs() << "SLP: Not vectorizing strength-reducible address "
+ "computations.\n");
+ continue;
----------------
alexey-bataev wrote:
```suggestion
// Left to loop strength reduction, keep the once-used seeds away.
SmallVector<Instruction *> Arithmetic;
for (Value *Idx : Bundle)
collectIndexArithmetic(Idx, *LI, Arithmetic);
for (Instruction *I : Arithmetic)
SkippedIndexOps[I->getParent()].push_back(I);
continue;
```
https://github.com/llvm/llvm-project/pull/226220
More information about the llvm-commits
mailing list