[all-commits] [llvm/llvm-project] d886da: RegisterCoalescer: Prune undef subranges from copy...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Wed Feb 3 10:43:14 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d886da042c65e7bac3dc77215abf2f29b6a87de6
      https://github.com/llvm/llvm-project/commit/d886da042c65e7bac3dc77215abf2f29b6a87de6
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2021-02-03 (Wed, 03 Feb 2021)

  Changed paths:
    M llvm/lib/CodeGen/RegisterCoalescer.cpp
    M llvm/test/CodeGen/AMDGPU/coalesce-identity-copies-undef-subregs.mir
    A llvm/test/CodeGen/AMDGPU/loop-live-out-copy-undef-subrange.ll

  Log Message:
  -----------
  RegisterCoalescer: Prune undef subranges from copy pairs in loops

If we had a pair of copies inside a loop which introduced new liveness
to a subregister which was undef before the loop, we would have a
dummy phi-only segment remaining across the loop body. Later, this
false segment would confuse RenameIndependentSubregs causing it to
introduce IMPLICIT_DEFs with broken value numbering.

It seems always adding the lanes to ShrinkMask is OK, so any
conditions should be purely a compile time filter.




More information about the All-commits mailing list