[PATCH] D125301: [LoopVectorize] Add option to use active lane mask for loop control flow

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 02:01:06 PDT 2022


david-arm added a comment.

Hi @fhahn, I've tried working on a patch to use VPWidenPHIRecipe instead of VPActiveLaneMaskPHIRecipe (see D129744 <https://reviews.llvm.org/D129744>), which is based off another WIP of yours (D128937 <https://reviews.llvm.org/D128937>). However, there are still problems with this approach:

1. Still quite a lot of code assumes that VPWidenPHIRecipe has an underlying value, which I've tried to hack my way around.
2. Updating VPlan::getActiveLaneMaskPHI() is tricky now - I've hacked this by looking for a VPWidenPHIRecipe without an underlying value.
3. In addCanonicalIVRecipes the loop exit block that I add as an incoming block for the VPWidenPHIRecipe is not the final exit block that you see in VPlan::execute. In fixNonInductionPHIs we crash because we cannot map this bad exit VPBasicBlock to a real BasicBlock. It looks like I still may have to let VPlan::execute add the latch incoming value for VPWidenPHIRecipes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125301



More information about the llvm-commits mailing list