[PATCH] D106312: [AMDGPU] Allow rematerialization of virtual reg uses

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 12:34:59 PDT 2021


rampitec added a comment.

Another form of the same test, without a killed use but with a later separate KILL:

  # RUN: llc -march=amdgcn -mcpu=gfx900 -o - -verify-coalescing -run-pass=simple-register-coalescing %s
  
  ---
  name:            test
  tracksRegLiveness: true
  body:             |
    bb.0:
      liveins: $vgpr0
  
      %0:vgpr_32 = COPY $vgpr0
      %1:vgpr_32 = V_ADD_U32_e32 1, %0, implicit $exec
      %2:vgpr_32 = V_MOV_B32_e32 %1, implicit $exec
      KILL %1
      $vgpr0 = COPY killed %2
      SI_RETURN_TO_EPILOG killed $vgpr0
  ...

Looks like LRE checks that all uses are available, but coalescer does not.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106312/new/

https://reviews.llvm.org/D106312



More information about the llvm-commits mailing list