[all-commits] [llvm/llvm-project] 30f6f8: RegisterPressure: Remove dead defs correctly
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Thu Sep 10 05:32:16 PDT 2026
Branch: refs/heads/users/arsenm/codegen/registerpressure-remove-dead-defs
Home: https://github.com/llvm/llvm-project
Commit: 30f6f8641c48d53abb78bcd5f03bdb74d5b6ff47
https://github.com/llvm/llvm-project/commit/30f6f8641c48d53abb78bcd5f03bdb74d5b6ff47
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-09-10 (Thu, 10 Sep 2026)
Changed paths:
M llvm/lib/CodeGen/RegisterPressure.cpp
A llvm/test/CodeGen/X86/dead-register-pr76416.mir
A llvm/test/CodeGen/X86/inline-asm-pr149144.ll
A llvm/test/CodeGen/X86/inline-asm-pr155807.ll
A llvm/test/CodeGen/X86/inline-asm-pr76416.ll
M llvm/test/CodeGen/X86/masked-udiv.ll
M llvm/test/CodeGen/X86/min-legal-vector-width.ll
A llvm/test/CodeGen/X86/pr205272.ll
M llvm/test/CodeGen/X86/ssub_sat_plus.ll
M llvm/test/CodeGen/X86/udiv_fix.ll
M llvm/test/CodeGen/X86/udiv_fix_sat.ll
M llvm/test/CodeGen/X86/usub_sat_plus.ll
M llvm/test/CodeGen/X86/vector-idiv-strictfp.ll
M llvm/test/CodeGen/X86/vector-idiv-udiv-512.ll
M llvm/test/CodeGen/X86/xmulo.ll
Log Message:
-----------
RegisterPressure: Remove dead defs correctly
When an instruction has overlapping register defs where only some carry the
dead flag (for example a dead super-register def alongside a live sub-register
def), the collector left the shared register units in both the live and dead def
sets. That produced a PressureDiff decrement with no matching increment and tripped
the "PSet overflow/underflow" assertion in getUpwardPressureDelta.
A register unit is dead if any def covering it is dead, regardless of operand
order. Reconcile by subtracting the dead defs from the live defs instead of the
reverse: removeRegLanes only clears the overlapping units, so a def keeps any
units a dead def does not cover.
Fixes #155807.
Fixes #149144.
Fixes #76416.
Fixes #205272.
Co-authored-by: XChy <xxs_chy at outlook.com>
Co-authored-by: Claude claude-opus-4.8 <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