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>
(cherry picked from commit 7fe84024cb0985c2ab676d3e83520e5213db05df)
This commit is contained in:

committed by
Eric Engestrom

parent
a900b3f39d
commit
87902dca71
@@ -1194,7 +1194,7 @@
|
||||
"description": "aco: fix get_temp_reg_changes with clobbered operands",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "d6cb45dbb03941edd65c948a243e73774184eeee",
|
||||
"notes": null
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user