mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
aco: fix get_temp_reg_changes with clobbered operands
The spiller might have tried to spill a live-through first or second
s_fmac_f32 operand, but this wouldn't have reduced the SGPRs if the third
operand wasn't killed
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13038
Fixes: d6cb45dbb0 ("aco/spill: Allow spilling live-through operands")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34699>
This commit is contained in:
parent
656d7a0f88
commit
7fe84024cb
1 changed files with 2 additions and 0 deletions
|
|
@ -67,6 +67,8 @@ RegisterDemand get_temp_reg_changes(Instruction* instr)
|
|||
for (Operand op : instr->operands) {
|
||||
if (op.isFirstKillBeforeDef() || op.isCopyKill())
|
||||
available_def_space -= op.getTemp();
|
||||
else if (op.isClobbered() && !op.isKill())
|
||||
available_def_space -= op.getTemp();
|
||||
}
|
||||
|
||||
return available_def_space;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue