[all-commits] [llvm/llvm-project] 16d707: [AMDGPU] Fix v_swap_b32 formation on physical regi...

Jay Foad via All-commits all-commits at lists.llvm.org
Thu Apr 29 12:54:07 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 16d707e656ecd54934afe6c3adb5f710fd6bb36c
      https://github.com/llvm/llvm-project/commit/16d707e656ecd54934afe6c3adb5f710fd6bb36c
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-04-29 (Thu, 29 Apr 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
    M llvm/test/CodeGen/AMDGPU/v_swap_b32.mir

  Log Message:
  -----------
  [AMDGPU] Fix v_swap_b32 formation on physical registers

As explained in the comments, matchSwap matches:

// mov t, x
// mov x, y
// mov y, t

and turns it into:

// mov t, x (t is potentially dead and move eliminated)
// v_swap_b32 x, y

On physical registers we don't have full use-def chains so the check
for T being live-out was not working properly with subregs/superregs.

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




More information about the All-commits mailing list