[llvm] [SLP]Vectorize single-user instructions as the last-attempt seeds (PR #212579)
Ryan Buchner via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 12:03:22 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));
----------------
bababuck wrote:
Which call is from intermediate analysis?
For the call from the function `vectorizeOnceUsedSeeds`, `R.isVectorized` doesn't make sense because `VectorizableTree` contains either the vectorized/failed tree from the last vectorization attempt (likely from `vectorizeChainsInBlock`).
https://github.com/llvm/llvm-project/pull/212579
More information about the llvm-commits
mailing list