[all-commits] [llvm/llvm-project] f23c40: PeepholeOpt: Clear kill flags in foldImmediate (#1...

Frederik Harwath via All-commits all-commits at lists.llvm.org
Tue May 5 08:57:29 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f23c4074717bb8b757d9af8ceda49c94524f18e2
      https://github.com/llvm/llvm-project/commit/f23c4074717bb8b757d9af8ceda49c94524f18e2
  Author: Frederik Harwath <frederik.harwath at amd.com>
  Date:   2026-05-05 (Tue, 05 May 2026)

  Changed paths:
    M llvm/lib/CodeGen/PeepholeOptimizer.cpp
    M llvm/test/CodeGen/AMDGPU/peephole-fold-imm.mir
    M llvm/test/CodeGen/X86/peephole.mir

  Log Message:
  -----------
  PeepholeOpt: Clear kill flags in foldImmediate (#195680)

When foldImmediate replaces a COPY destination with its source,
this extends the live range of the source, but it does not update the
kill flags.

Clear kill flags on the source register after replacement.

This was found while working on REG_SEQUENCE optimizations motivated by
AMDGPU demands. Both an AMDGPU and an X86 test case are added to show that
the issue is not AMDGPU specific.



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