[PATCH] D126885: [SLP]Cost for a constant buildvector.

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 14:23:57 PDT 2022


vdmitrie added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5783
+           E->UserTreeIndices.front().UserTE->isAltShuffle())
+              ? 0
+              : E->UserTreeIndices.front().UserTE->getOpcode();
----------------
Just wondering is that possible for UserTreeIndices to be empty here? AFAIU it can be for root only but constants do not seed vtree.
if alternate opcodes are for shl/shr but shift value is splat it is still can be immediate for both of them.



================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5802
+      } else {
+        InstructionCost ScalarCost = 0;
+        for (Value *V : VL) {
----------------
drop it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126885/new/

https://reviews.llvm.org/D126885



More information about the llvm-commits mailing list