aco: Check that we don't override exec_val operands during branching sequence optimization.

Fixes: baab6f18c9 ("aco: Optimize branching sequence during SSA elimination.")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18049>
This commit is contained in:
Georg Lehmann
2022-08-15 13:26:23 +02:00
committed by Marge Bot
parent baf314e2c0
commit 9e5f311efe

View File

@@ -417,6 +417,13 @@ try_optimize_branching_sequence(ssa_elimination_ctx& ctx, Block& block, const in
}
}
if (save_original_exec) {
/* We insert the exec copy before exec_val, so exec_val can't use those registers. */
for (const Operand& op : exec_val->operands)
if (regs_intersect(exec_copy_def, op))
return;
}
/* Reassign the instruction to write exec directly. */
exec_val->definitions[0] = Definition(exec, ctx.program->lane_mask);