[PATCH] D154953: [InstCombine] Remove the reminder loop if we know the mask is always true

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 05:13:39 PDT 2023


Allen created this revision.
Allen added reviewers: david-arm, dmgreen, sdesmalen.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Allen requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, 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 remainder loop of mask scalable loop can also be removed
If we know the mask is always going to be true for every vector iteration.

      

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


https://reviews.llvm.org/D154953

Files:
  llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
  llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/sve-interleaved-accesses.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-phi.ll
  llvm/test/Transforms/LoopVectorize/X86/pr34438.ll
  llvm/test/Transforms/LoopVectorize/pr44488-predication.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154953.539029.patch
Type: text/x-patch
Size: 81595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230711/66d1c501/attachment-0001.bin>


More information about the llvm-commits mailing list