[PATCH] D101916: [LoopVectorize] Fix crash for predicated instructions with scalable VF

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 07:23:07 PDT 2021


david-arm added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7768
 
+bool LoopVectorizationCostModel::loopHasScalarWithPredication(
+    ElementCount VF, bool StateFoldTailByMasking) {
----------------
sdesmalen wrote:
> I think it'd be good to give this a more generic name, so that we can use it to test for other cases as well. How about `loopCanBeWidenedWithScalableVectors` which implies the conditions should be negated, and you may want to return some message of why it did not vectorize, e.g.
> 
>   LoopVectorizationCostModel::loopCanBeWidenedWithScalableVectors(ElementCount MaxVF, std::string &Message)
This is similar to https://reviews.llvm.org/D102394 where I moved the canVectorizeReductions call in there too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101916



More information about the llvm-commits mailing list