[PATCH] D45469: [SLP] Use getExtractWithExtendCost() to compute the scalar cost of extractelement/ext pair

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 12 06:57:49 PDT 2018


ABataev added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2201
+                  all_of(Ext->users(),
+                         [](User *U) { return isa<GetElementPtrInst>(U); })) {
+                // Use getExtractWithExtendCost() to calculate the cost of
----------------
I think you can use just `GetElementPtr::classof` here as a predicate. Also, it would be good to have negative test(s) for the situation where this should not work.


Repository:
  rL LLVM

https://reviews.llvm.org/D45469





More information about the llvm-commits mailing list