[PATCH] D154314: [LV] Prefer the tail fold according the the user hint

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 2 19:40:35 PDT 2023


Allen created this revision.
Allen added reviewers: david-arm, sdesmalen, reames, dmgreen, fhahn.
Herald added subscribers: artagnon, StephenFan, hiraditya.
Herald added a project: All.
Allen requested review of this revision.
Herald added subscribers: llvm-commits, alextsao1999.
Herald added a project: LLVM.

We check the loop trip count is known a power of 2 to determine
whether the tail loop can be eliminated in D146199 <https://reviews.llvm.org/D146199>.
However, the mask scalable loop can fold the tail loop for all
the trip count, so we don't need check that if the user specified
option -prefer-predicate-over-epilogue=predicate-else-scalar-epilogue.

      

Fix https://github.com/llvm/llvm-project/issues/63616.


https://reviews.llvm.org/D154314

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/eliminate-tail-predication.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154314.536646.patch
Type: text/x-patch
Size: 9340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230703/8e1bc151/attachment.bin>


More information about the llvm-commits mailing list