mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
aco/spill: Fix improper handling of exec phis
The "continue" was placed in the wrong loop, leading to exec being
counted as a spilled register when it wasn't.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: a56ddca4e8 ('aco: make all exec accesses non-temporaries')
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4533
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10486>
This commit is contained in:
parent
0c591ace9e
commit
741e84f554
1 changed files with 3 additions and 2 deletions
|
|
@ -606,12 +606,13 @@ RegisterDemand init_live_in_vars(spill_ctx& ctx, Block* block, unsigned block_id
|
|||
for (aco_ptr<Instruction>& phi : block->instructions) {
|
||||
if (!is_phi(phi))
|
||||
break;
|
||||
if (!phi->definitions[0].isTemp())
|
||||
continue;
|
||||
|
||||
std::vector<unsigned>& preds = phi->opcode == aco_opcode::p_phi ? block->logical_preds : block->linear_preds;
|
||||
bool spill = true;
|
||||
|
||||
for (unsigned i = 0; i < phi->operands.size(); i++) {
|
||||
if (!phi->definitions[0].isTemp())
|
||||
continue;
|
||||
/* non-temp operands can increase the register pressure */
|
||||
if (!phi->operands[i].isTemp()) {
|
||||
partial_spills.insert(phi->definitions[0].getTemp());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue