aco: ignore copykill+latekill operands in get_temp_reg_changes

This is possible with two vectors which share a temporary, though I don't
think it currently happens in practice.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40825>
This commit is contained in:
Rhys Perry 2026-04-07 14:17:29 +01:00 committed by Marge Bot
parent 590d1d7274
commit 1619288a19

View file

@ -67,7 +67,7 @@ RegisterDemand get_temp_reg_changes(Instruction* instr)
}
for (Operand op : instr->operands) {
if (op.isFirstKillBeforeDef() || op.isCopyKill())
if (op.isFirstKillBeforeDef() || (op.isCopyKill() && !op.isLateKill()))
available_def_space -= op.getTemp();
else if (op.isClobbered() && !op.isKill())
available_def_space -= op.getTemp();