[PATCH] D104709: [ARM] Revert WLSTP to DLSTP if the target block is out of range

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 06:26:39 PDT 2021


dmgreen created this revision.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
dmgreen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If the block target for a WLSTP instruction is known to be out of range, and cannot be fixed by the ARMBlockPlacementPass, we can relax it to a DLSTP (and cmp/branch) to still allow the creation of tail predicated loops. That is what this patch does, adding extra revert code to the  fallback path of ARMBlockPlacementPass.

Due to the code produced when reverting, this creates a DLSTP between a Bcc and a B, meaning the DLSTP needs to be a terminator. DLS is not a terminator like DLSTP is, so this is currently only enabled for the later.


https://reviews.llvm.org/D104709

Files:
  llvm/lib/Target/ARM/ARMBlockPlacement.cpp
  llvm/lib/Target/ARM/ARMInstrMVE.td
  llvm/test/CodeGen/Thumb2/block-placement.mir
  llvm/test/CodeGen/Thumb2/mve-memtp-branch.ll
  llvm/test/CodeGen/Thumb2/mve-memtp-loop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104709.353617.patch
Type: text/x-patch
Size: 5786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210622/9d34beac/attachment.bin>


More information about the llvm-commits mailing list