r300: run nir_opt_algebraic in the backend

No effect in shader-db right now, but without it the next commit
leads to small regression in instruction numbers (0.03%) instead
of the small win we have now (-0.05%).

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32160>
This commit is contained in:
Pavel Ondračka 2024-11-14 20:20:37 +01:00 committed by Marge Bot
parent 63b0692eac
commit d406dbbde9

View file

@ -2278,8 +2278,11 @@ nir_to_rc(struct nir_shader *s, struct pipe_screen *screen)
NIR_PASS_V(s, nir_to_rc_lower_tex);
bool progress;
NIR_PASS_V(s, nir_opt_constant_folding);
do {
progress = false;
NIR_PASS(progress, s, nir_opt_algebraic);
NIR_PASS(progress, s, nir_opt_constant_folding);
} while (progress);
do {
progress = false;