[PATCH] D129550: [LoopVectorize] Ensure the VPReductionRecipe is placed after all it's inputs

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 02:36:51 PDT 2022


david-arm created this revision.
david-arm added reviewers: sdesmalen, kmclaughlin, fhahn.
Herald added subscribers: shiva0217, hiraditya, kristof.beyls.
Herald added a project: All.
david-arm requested review of this revision.
Herald added subscribers: llvm-commits, alextsao1999.
Herald added a project: LLVM.

When vectorising ordered reductions we call a function
LoopVectorizationPlanner::adjustRecipesForReductions to replace the
existing VPWidenRecipe for the fadd instruction with a new
VPReductionRecipe. We attempt to insert the new recipe in the same
place, but this is wrong because createBlockInMask may have
generated new recipes that VPReductionRecipe now depends upon. I
have changed the insertion code to append the recipe to the
VPBasicBlock instead.

Added a new RUN with tail-folding enabled to the existing test:

  Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129550

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll
  llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129550.443885.patch
Type: text/x-patch
Size: 28627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220712/935297b9/attachment.bin>


More information about the llvm-commits mailing list