[all-commits] [llvm/llvm-project] 0ea5eb: [RegisterCoalescer] Fix updating LiveIntervals in ...

Jay Foad via All-commits all-commits at lists.llvm.org
Wed May 24 07:22:38 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ea5eb143c7a63105b4479c455642b4c4ef3278c
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M llvm/lib/CodeGen/RegisterCoalescer.cpp
    M llvm/test/CodeGen/AArch64/regcoal-physreg.mir

  Log Message:
  [RegisterCoalescer] Fix updating LiveIntervals in joinReservedPhysReg

Live intervals for physical registers are calculated lazily on demand.
In a case like this:

  16B    %0:gpr32 = IMPLICIT_DEF
  32B    $wzr = COPY %0

if the live interval for $wzr did not already exist then the update code
in joinReservedPhysReg would create it with a definition at 32B, which
would remain even after the COPY was deleted.

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

More information about the All-commits mailing list