[llvm] [SLP]Vectorize single-user instructions as the last-attempt seeds (PR #212579)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 11:55:17 PDT 2026


================
@@ -10028,6 +10067,15 @@ static SeedGroupKey getSeedGroupKey(const Instruction *I,
 }
 } // namespace
 
+/// Returns true if the role of \p I is already decided by its user: a deleted
+/// user was folded into some other vector by an earlier attempt.
+static bool hasResolvedUser(Instruction *I, const BoUpSLP &R) {
+  return any_of(I->users(), [&](User *U) {
+    auto *UI = dyn_cast<Instruction>(U);
+    return UI && (R.isDeleted(UI) || R.isVectorized(UI));
----------------
alexey-bataev wrote:

It is also used during intermediate analysis to check if some instruction is part of the vectorized node.

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


More information about the llvm-commits mailing list