[llvm] [SLP][REVEC] Fix insertelement has multiple uses. (PR #102329)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 05:13:46 PDT 2024
================
@@ -6402,6 +6402,14 @@ BoUpSLP::TreeEntry::EntryState BoUpSLP::getScalarsVectorizationState(
return TreeEntry::NeedToGather;
}
+ if (any_of(VL, [&SourceVectors](Value *V) {
+ if (SourceVectors.contains(V))
+ return !V->hasOneUse();
+ // The last InsertElement can have multiple uses.
+ return false;
----------------
alexey-bataev wrote:
`return SourceVectors.contains(V) && !V->hasOneUse();`
https://github.com/llvm/llvm-project/pull/102329
More information about the llvm-commits
mailing list