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

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 21 02:04:46 PDT 2021


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7624
     BranchInst *BI = cast<BranchInst>(I);
-    if (VF.isVector() && BI->isConditional() &&
+    if (VF.isVector() && BI->isConditional() && !VF.isScalable() &&
         (PredicatedBBsAfterVectorization.count(BI->getSuccessor(0)) ||
----------------
The cost of the `Br` should also be invalid, because it tries to calculate the cost as if it's trying to scalarize the operation if ScalarPredicatedBB == true.


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