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

Caroline via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 25 08:40:58 PDT 2021


CarolineConcatto marked 5 inline comments as done.
CarolineConcatto added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7768
 
+bool LoopVectorizationCostModel::loopHasScalarWithPredication(
+    ElementCount VF, bool StateFoldTailByMasking) {
----------------
david-arm wrote:
> 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.
Thank you @david-arm and @sdesmalen 
In order to not create the same function twice I have rebased this patch based on D102394. 
So there is only one canWidenLoopWithScalableVectors.
This patch already has one dependence in D102437.
However, we can remove dependence on D102394, and copy the function if this patch and D102437 are accepted first  



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