[PATCH] D106358: [InstCombine] Add more complex folds for extractelement + stepvector

Peter Waller via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 08:51:06 PDT 2021


peterwaller-arm added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:55
 /// Return true if the value is cheaper to scalarize than it is to leave as a
 /// vector operation. IsConstantExtractIndex indicates whether we are extracting
 /// one known element from a vector constant.
----------------
Do you need to update this comment, it still refers to IsConstantExtractIndex.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:68
+      cast<IntrinsicInst>(V)->getIntrinsicID() ==
+          Intrinsic::experimental_stepvector) {
+    ElementCount EC = cast<VectorType>(V->getType())->getElementCount();
----------------
Does this condition neaten with match syntax like `match(V, m_Intrinsic<Intrinsic::experimental_stepvector>())`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106358



More information about the llvm-commits mailing list