[PATCH] D76017: [SLPVectorizer][SVE] Bail out early for scalable vector.

Huihui Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 15:45:27 PDT 2020


huihuiz added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:403
+  // Make sure Instructions are not already vectorized.
+  if (llvm::any_of(VL, [](Value *V) { return V->getType()->isVectorTy(); }))
+    return InstructionsState(VL[BaseIndex], nullptr, nullptr);
----------------
efriedma wrote:
> Should we be using `isValidElementType(V->getType())` here, instead of explicitly checking for vector types?
Update patch by changing the checking sequence, reject invalid element type before trying to determine SLP vectorization factor.

If we move isValidElementType() into getSameOpcode(), we will lose the optimization remark missed information.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76017





More information about the llvm-commits mailing list