aco/spill: Unconditionally add 2 SGPRs to live-in demand

Due to undefined Operands, it might not be enough to check the
predecessors' register demand.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29804>
This commit is contained in:
Daniel Schürmann
2024-06-20 12:21:53 +02:00
committed by Marge Bot
parent 26c58ca9de
commit 4c2f231cc0

View File

@@ -330,11 +330,8 @@ get_live_in_demand(spill_ctx& ctx, unsigned block_idx)
reg_pressure += get_demand_before(ctx, block_idx, idx);
/* Consider register pressure from linear predecessors. This can affect
* reg_pressure if the branch instructions define sgprs. */
for (unsigned pred : block.linear_preds)
reg_pressure.sgpr =
std::max<int16_t>(reg_pressure.sgpr, ctx.program->live.register_demand[pred].back().sgpr);
/* In order to create long jumps, we might need an empty SGPR pair. */
reg_pressure.sgpr += 2;
return reg_pressure;
}