[all-commits] [llvm/llvm-project] 60eba8: RegisterCoalescer: Remove phi-only subranges when ...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Dec 15 14:36:50 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 60eba8161bd314eaf02952deaa023c334fcca080
      https://github.com/llvm/llvm-project/commit/60eba8161bd314eaf02952deaa023c334fcca080
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-12-15 (Tue, 15 Dec 2020)

  Changed paths:
    M llvm/lib/CodeGen/RegisterCoalescer.cpp
    A llvm/test/CodeGen/AMDGPU/coalesce-identity-copies-undef-subregs.mir

  Log Message:
  -----------
  RegisterCoalescer: Remove phi-only subranges when erasing identity copies

Undef subranges are not present in the live range values, except when
they cross block boundaries. In this situation, a identity copy is
inside a loop, and one of the lanes is undefined. It only appears
alive inside the loop due to the copy. Once the copy was erased, it
would leave behind a segment inside the loop body with no
corresponding def anywhere in the program.

When RenameIndependentSubregs processed this dummy interval, it would
introduce a "Multiple connected components in live interval" verifier
error when IMPLICIT_DEFs were added to the other two blocks. I believe
there is a missing verifier check for this type of dummy interval.

I have found additional cases from the same fundamental problem in
other areas I haven't managed to fix yet (e.g. the commented out
prune_subrange_phi_value_* cases).




More information about the All-commits mailing list