[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
Wed Apr 11 09:52:12 PDT 2018


ABataev added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2199
+              Instruction *Ext = E->user_back();
+              if (isa<SExtInst>(Ext) || isa<ZExtInst>(Ext)) {
+                // Use getExtractWithExtendCost() to calculate the cost of
----------------
I think you need to check that `Ext` user is GEP and `Ext` is used as GEP index.


Repository:
  rL LLVM

https://reviews.llvm.org/D45469





More information about the llvm-commits mailing list