[PATCH] D146859: RegAllocGreedy: Fix detection of lanes read by a bundle

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 18:40:21 PDT 2023


arsenm created this revision.
arsenm added reviewers: qcolombet, MatzeB, foad, kparzysz.
Herald added subscribers: luke, kosarev, StephenFan, frasercrmck, kerbowa, luismarques, apazos, sameer.abuasal, s.egerton, dmgreen, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson, jvesely.
Herald added a project: All.
arsenm requested review of this revision.
Herald added subscribers: pcwang-thead, MaskRay, wdng.
Herald added a project: LLVM.

SplitKit creates questionably formed bundles of copies
when it needs to copy a subset of live lanes and can't do
it with a single subregister index. These are merely marked
as part of a bundle, and don't start with a BUNDLE instruction.
Queries for the slot index would give the first copy in the
bundle, and we need to inspect the operands of all the other
bundled copies.

      

Also fix and simplify detection of read lane subsets. This causes
some RISCV test regressions, but these look like accidentally beneficial
splits. I don't see a subrange based reason to perform these splits.

      

Avoids some really ugly regressions in a future patch.


https://reviews.llvm.org/D146859

Files:
  llvm/lib/CodeGen/RegAllocGreedy.cpp
  llvm/test/CodeGen/AMDGPU/greedy-instruction-split-subrange.mir
  llvm/test/CodeGen/AMDGPU/splitkit-copy-live-lanes.mir
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int.ll
  llvm/test/CodeGen/Thumb2/mve-vst3.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146859.508261.patch
Type: text/x-patch
Size: 73278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230325/9c7dc319/attachment.bin>


More information about the llvm-commits mailing list