[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


================
@@ -36569,13 +36575,22 @@ bool SLPVectorizerPass::vectorizeOnceUsedSeeds(BasicBlock *BB, BoUpSLP &R) {
   SmallDenseMap<std::pair<size_t, size_t>, unsigned> KeyToGroup;
   SmallDenseMap<Value *, unsigned> SeedGroups;
   PoorThroughputOpCache PoorThroughputCache;
+  SmallPtrSet<Value *, 16> IndexedGEPsInBB;
+  if (auto It = IndexedGEPs.find(BB); It != IndexedGEPs.end())
+    for (Value *GEP : It->second)
+      if (GEP)
+        IndexedGEPsInBB.insert(GEP);
----------------
alexey-bataev wrote:

```suggestion
  SmallPtrSet<Value *, 16> SkippedInBB;
  if (auto It = SkippedIndexOps.find(BB); It != SkippedIndexOps.end())
    for (Value *Op : It->second)
      if (Op)
        SkippedInBB.insert(Op);
```

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


More information about the llvm-commits mailing list