nir/divergence: ignore boolean phis for ignore_undef_if_phi_srcs
The only user of this option (ACO) doesn't support this for boolean phis. fossil-db (navi21): Totals from 1208 (1.51% of 79825) affected shaders: Instrs: 826592 -> 823201 (-0.41%); split: -0.41%, +0.00% CodeSize: 4228296 -> 4224280 (-0.09%); split: -0.11%, +0.01% Latency: 3030803 -> 3028410 (-0.08%); split: -0.08%, +0.01% InvThroughput: 578588 -> 578693 (+0.02%); split: -0.00%, +0.02% VClause: 19500 -> 19494 (-0.03%) Copies: 60914 -> 57589 (-5.46%); split: -5.47%, +0.01% PreVGPRs: 50759 -> 50774 (+0.03%) VALU: 528582 -> 528671 (+0.02%); split: -0.00%, +0.02% SALU: 121134 -> 117646 (-2.88%) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Backport-to: 25.1 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13455 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13509 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36005>
This commit is contained in:
@@ -1372,7 +1372,11 @@ visit_if(nir_if *if_stmt, struct divergence_state *state)
|
||||
phi->def.loop_invariant =
|
||||
invariant && nir_foreach_src(&phi->instr, src_invariant, state->loop);
|
||||
}
|
||||
bool ignore_undef = state->options & nir_divergence_ignore_undef_if_phi_srcs;
|
||||
|
||||
/* The only user of this option (ACO) only supports it for non-boolean phis. */
|
||||
bool ignore_undef =
|
||||
(state->options & nir_divergence_ignore_undef_if_phi_srcs) && phi->def.bit_size != 1;
|
||||
|
||||
progress |= visit_if_merge_phi(phi, cond_divergent, ignore_undef);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user