[all-commits] [llvm/llvm-project] 3d4877: [ARM] Reassociate BFI

David Green via All-commits all-commits at lists.llvm.org
Thu Jul 1 13:08:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d48775b89cfcaa20dae9928f20410ee61bdda4c
      https://github.com/llvm/llvm-project/commit/3d48775b89cfcaa20dae9928f20410ee61bdda4c
  Author: David Green <david.green at arm.com>
  Date:   2021-07-01 (Thu, 01 Jul 2021)

  Changed paths:
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/test/CodeGen/ARM/bfi.ll

  Log Message:
  -----------
  [ARM] Reassociate BFI

D104868 removed an (incorrect) fold for distributing BFI instructions in
a chain, combining them into a single instruction. BFIs like that are
hard to test, as the patterns are often destroyed before they become
BFIs. But it can come up in places, with chains of BFIs that can be
combined.

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.

Differential Revision: https://reviews.llvm.org/D105096




More information about the All-commits mailing list