[PATCH] D55872: RegBankSelect: Fix copy insertion point for terminators

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 17:54:43 PST 2018


arsenm created this revision.
arsenm added reviewers: qcolombet, t.p.northover, MatzeB.
Herald added subscribers: tpr, nhaehnle, wdng, jvesely.

If a copy was needed to handle the condition of brcond, it was being
inserted before the defining instruction. Add tests for iterator edge
cases.

      

I find the existing code here suspect for the case where it's looking
for terminators that modify the register. It's going to insert a copy
in the middle of the terminators, which isn't allowed (it might be
necessary to have a COPY_terminator if anybody actually needs this).

      

Also legalize brcond for AMDGPU.


https://reviews.llvm.org/D55872

Files:
  lib/CodeGen/GlobalISel/RegBankSelect.cpp
  lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
  lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
  test/CodeGen/AMDGPU/GlobalISel/legalize-brcond.mir
  test/CodeGen/AMDGPU/GlobalISel/regbankselect-brcond.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55872.178823.patch
Type: text/x-patch
Size: 9266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181219/3842dd71/attachment.bin>


More information about the llvm-commits mailing list