[PATCH] D89969: [SLP] Consider alternatives for cost of select instructions.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 09:36:52 PDT 2020


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3559-3595
+            auto *Select = dyn_cast<SelectInst>(I);
+            if (!Select)
+              return false;
+            auto *Cmp = dyn_cast<CmpInst>(Select->getOperand(0));
+            if (!Cmp)
+              return false;
+
----------------
Use `match()` functions to match the pattern. Also, what's the criterion for generating intrinsic or vector instruction? Can we rely on it unconditionally and just choose the minimum cost?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89969



More information about the llvm-commits mailing list