From f1c2ea99e2a100f14d4fcf6f59b108ec4520b312 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 20 May 2023 23:21:57 -0400 Subject: [PATCH] agx: Constant fold when optimizing int64 Otherwise we can get bcsel(false, ...) in the final optimized code, which isn't great. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_compile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index cbc2ca9a8b5..d4fd385feb0 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -1966,6 +1966,7 @@ agx_optimize_nir(nir_shader *nir, unsigned *preamble_size) progress = false; NIR_PASS(progress, nir, nir_opt_algebraic); + NIR_PASS(progress, nir, nir_opt_constant_folding); NIR_PASS(progress, nir, nir_opt_dce); } while (progress); }