[all-commits] [llvm/llvm-project] 5c170b: Mips: Mark the $gp setup copy dead when erasing th...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Sep 29 03:04:07 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c170b01350198b7f1f830fb53253652015077b3
      https://github.com/llvm/llvm-project/commit/5c170b01350198b7f1f830fb53253652015077b3
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M llvm/lib/Target/Mips/MipsOptimizePICCall.cpp
    A llvm/test/CodeGen/Mips/optimize-pic-call-dead-gp.ll

  Log Message:
  -----------
  Mips: Mark the $gp setup copy dead when erasing the call's $gp use (#227216)

MipsOptimizePICCall drops the implicit $gp operand from a call when the
lazy binding stub for the callee has already run. The copy that set $gp
up for that call then has no reader left, but nothing flagged it, so the
MIR carried a live def until a later liveness recomputation cleaned it
up.

The pass already walks each block in order, so track the reaching
definition of $gp as it goes and mark it dead when the use is erased.

Co-authored-by: Claude Opus 5 <noreply at anthropic.com>



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