[PATCH] D105096: [ARM] Reassociate BFI

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 03:02:21 PDT 2021


dmgreen created this revision.
dmgreen added reviewers: samtebbs, SjoerdMeijer, NickGuy, efriedma, aemerson.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
dmgreen requested review of this revision.
Herald added a project: LLVM.

D104868 <https://reviews.llvm.org/D104868> removed an (incorrect) fold for distributing BFI instructions in a chain, combining them into a single instruction. BFI's like that are hard to test, as the patterns are often destroyed before they become BFIs. But it did lead to regressions in some of our tests.

This patch adds a replacement, which reassociates BFI instructions with non-overlapping insertion masks so that low bits are inserted first. This can end up sorting the nodes so that adjacent inserts are next to one another, allowing the existing folds to combine into a single BFI.


https://reviews.llvm.org/D105096

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/ARM/bfi.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105096.355153.patch
Type: text/x-patch
Size: 4018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210629/6ddf477b/attachment.bin>


More information about the llvm-commits mailing list