[llvm] [SLP] no need to generate extract for in-tree uses for original scala… (PR #76077)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 21 05:26:08 PST 2023
================
@@ -11898,6 +11864,12 @@ Value *BoUpSLP::vectorizeTree(
Value *Vec = E->VectorizedValue;
assert(Vec && "Can't find vectorizable value");
+ // Generate extract for in-tree uses if the use is scalar operand in
+ // vectorized instruction.
+ if (auto *UserVecTE = getTreeEntry(User))
+ if (doesInTreeUserNeedToExtract(Scalar, cast<Instruction>(User), TLI))
+ User = cast<llvm::User>(UserVecTE->VectorizedValue);
+
----------------
alexey-bataev wrote:
Why need this? I meant try to fix the place where we buildingExtractUsers directly, I think it can be fixed by proper checking of the scalar element.
https://github.com/llvm/llvm-project/pull/76077
More information about the llvm-commits
mailing list