[PATCH] D99719: [SLP] Better estimate cost of no-op extracts on target vectors.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 1 13:17:40 PDT 2021


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3486
+    AllConsecutive &=
+        PrevExtract->getVectorOperand() == CurrentExtract->getVectorOperand() &&
+        PrevIdx + 1 == CurrentIdx &&
----------------
No need for this check anymore


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3462-3464
+  // Compute the number of number of elements per vector register for
+  // VecTy. If that is not possible, because the number of parts for VecTy
+  // is unknown, the number of elements.
----------------
fhahn wrote:
> ABataev wrote:
> > Is this possible? Or better to make it an assert?
> Unfortunately that can happen when compiling without a specific target and there's a test that tiggers an assert otherwise.
Maybe just exit in this case? And rely on the conservative cost model?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99719



More information about the llvm-commits mailing list