[all-commits] [llvm/llvm-project] 975fba: [RegisterCoalescer] Prune live range of early-clob...

Hongyu Chen via All-commits all-commits at lists.llvm.org
Tue Oct 14 11:44:40 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 975fba1b499422713e88cd6f374569f3bd38335e
      https://github.com/llvm/llvm-project/commit/975fba1b499422713e88cd6f374569f3bd38335e
  Author: Hongyu Chen <xxs_chy at outlook.com>
  Date:   2025-10-14 (Tue, 14 Oct 2025)

  Changed paths:
    M llvm/lib/CodeGen/LiveIntervals.cpp
    A llvm/test/CodeGen/RISCV/rvv/regcoal-liveinterval-pruning-crash.ll
    A llvm/test/CodeGen/RISCV/rvv/regcoal-liveinterval-pruning-crash.mir

  Log Message:
  -----------
  [RegisterCoalescer] Prune live range of early-clobber from live-in (#157628)

Fixes #134424
Fixes #71023
Refer to the context of #71024, when RegisterCoalescer tries to merge
`early-clobber %1:vr = PseudoVRGATHER_VI_M1 undef %1, ...`, JoinVals
reports `CR_Replace` as the conflict with `undef` can be ignored.
However, when pruning values, we need to remove any live ranges that
overlap a `CR_Replace` resolution. `LiveIntervals::pruneValue` missed
pruning the early-clobber part of the live ranges. This patch implements
it by removing the ranges from live-in.
I am not familiar with the RegisterCoalescer component. Any advice is
appreciated.
https://github.com/llvm/llvm-project/issues/156249 seems to be related,
but not resolved with this patch. I am still investigating.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list