[all-commits] [llvm/llvm-project] 41543a: [2/2][AMDGPU] Insert IMPLICIT_DEF to provide a rea...

Dhruva Chakrabarti via All-commits all-commits at lists.llvm.org
Thu May 28 01:04:49 PDT 2026


  Branch: refs/heads/users/dhruvachak/issue-196671-implicit-def
  Home:   https://github.com/llvm/llvm-project
  Commit: 41543ad389592868d47a1e361404b12f36d6392e
      https://github.com/llvm/llvm-project/commit/41543ad389592868d47a1e361404b12f36d6392e
  Author: Dhruva Chakrabarti <Dhruva.Chakrabarti at amd.com>
  Date:   2026-05-28 (Thu, 28 May 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
    M llvm/test/CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr-spill-joint-dom-mir.mir
    M llvm/test/CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr-spill-joint-dom.ll

  Log Message:
  -----------
  [2/2][AMDGPU] Insert IMPLICIT_DEF to provide a reaching def for unspilled reloads

Depends on https://github.com/llvm/llvm-project/pull/198472

PR #198472 skips unspilling a slot if a spill reload is reachable from
entry along a path that does not contain a spill store. This patch builds
on it by finding a basic block where an IMPLICIT_DEF can be inserted to
provide a reaching definition on all paths to such reloads, allowing the
unspill to proceed. This new def may extend the rewritten vreg's live
range, so extra interference checks are performed over the extended region
to pick an appropriate physical register.

For the joint-dominance tests, an IMPLICIT_DEF insertion block is found,
but no physical register is interference-free over the extended range,
so the unspill is conservatively skipped.

Assisted-by: Cursor/Claude Opus



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