agx: Run DCE twice

Needed to combine fsat with vectors due to nir_lower_blend changes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21122>
This commit is contained in:
Alyssa Rosenzweig
2022-12-19 22:32:46 -05:00
committed by Marge Bot
parent cd8b5427c7
commit e44a53f5dc

View File

@@ -1894,8 +1894,12 @@ agx_compile_function_nir(nir_shader *nir, nir_function_impl *impl,
agx_print_shader(ctx, stdout);
if (likely(!(agx_debug & AGX_DBG_NOOPT))) {
/* Dead code eliminate before instruction combining so use counts are
* right */
agx_dce(ctx);
agx_optimizer(ctx);
agx_opt_cse(ctx);
/* Dead code eliminate after instruction combining to get the benefit */
agx_dce(ctx);
agx_validate(ctx, "Optimization");