aco/insert_NOPs: add early exit to handle_valu_partial_forwarding_hazard_instr

No need to continue if there was already a hazard found in
a different control flow path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32191>
This commit is contained in:
Daniel Schürmann 2024-11-18 14:40:36 +01:00 committed by Marge Bot
parent 07df37ba01
commit bb87832ce0

View File

@ -1252,6 +1252,10 @@ handle_valu_partial_forwarding_hazard_instr(VALUPartialForwardingHazardGlobalSta
VALUPartialForwardingHazardBlockState& block_state,
aco_ptr<Instruction>& instr)
{
/* Check if there is already a hazard found on some other control flow path. */
if (global_state.hazard_found)
return true;
if (instr->isSALU() && !instr->definitions.empty()) {
if (block_state.state == written_after_exec_write && instr->writes_exec())
block_state.state = exec_written;