radv: do nir_opt_algebraic last in radv_optimize_nir_algebraic_early

fossil-db (navi21):
Totals from 15 (0.02% of 84369) affected shaders:
Instrs: 88362 -> 88310 (-0.06%)
CodeSize: 477056 -> 476804 (-0.05%)
Latency: 1410938 -> 1402039 (-0.63%)
InvThroughput: 704454 -> 700004 (-0.63%)
Copies: 5034 -> 5024 (-0.20%); split: -0.40%, +0.20%
PreSGPRs: 1014 -> 1010 (-0.39%)
VALU: 66264 -> 66221 (-0.06%); split: -0.07%, +0.01%
SALU: 10115 -> 10120 (+0.05%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38399>
This commit is contained in:
Rhys Perry 2025-10-23 11:14:55 +01:00 committed by Marge Bot
parent 06e2f12f85
commit 6ab6bc94d3

View file

@ -266,10 +266,10 @@ radv_optimize_nir_algebraic_early(nir_shader *nir)
NIR_PASS(progress, nir, nir_opt_peephole_select, &peephole_select_options);
NIR_PASS(_, nir, nir_opt_undef);
NIR_PASS(_, nir, nir_opt_phi_to_bool);
NIR_PASS(progress, nir, nir_opt_algebraic);
NIR_PASS(_, nir, nir_opt_generate_bfi);
NIR_PASS(progress, nir, nir_opt_remove_phis);
NIR_PASS(progress, nir, nir_opt_dead_cf);
NIR_PASS(progress, nir, nir_opt_algebraic);
if (!had_opt_fp_math_ctrl) {
NIR_PASS(progress, nir, nir_opt_fp_math_ctrl);