[PATCH] D97861: [LoopVectorize][NFC] Refactor code to use IRBuilder::CreateStepVector

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 4 07:14:06 PST 2021


david-arm marked an inline comment as done.
david-arm added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2243
   // Create and check the types.
   auto *ValVTy = cast<FixedVectorType>(Val->getType());
+  ElementCount VLen = ValVTy->getElementCount();
----------------
ctetreau wrote:
> NIT: Since the goal is to eventually support scalable vectors, this cast to FixedVectorType is counterproductive.
Yep, thanks for the suggestion. I originally left it as FixedVectorType so it would assert for scalable vectors, but you're right that we should assert this explicitly and use VectorType instead.


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

https://reviews.llvm.org/D97861



More information about the llvm-commits mailing list