From 7f6bd8b0030c94fb99fa0d1a2111f13ddcb3421e Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Fri, 5 Dec 2025 12:04:19 +0100 Subject: [PATCH] nir/peephole_select: allow mbcnt_amd It's just alu, so handle it like alu. Foz-DB Navi21: Totals from 3 (0.00% of 97591) affected shaders: Instrs: 433 -> 426 (-1.62%) CodeSize: 2408 -> 2388 (-0.83%) Latency: 7520 -> 7925 (+5.39%) InvThroughput: 857 -> 1009 (+17.74%) Copies: 55 -> 43 (-21.82%) Branches: 21 -> 17 (-19.05%) SALU: 79 -> 76 (-3.80%) Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_opt_peephole_select.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_peephole_select.c b/src/compiler/nir/nir_opt_peephole_select.c index c989e86956f..ac2d51bd147 100644 --- a/src/compiler/nir/nir_opt_peephole_select.c +++ b/src/compiler/nir/nir_opt_peephole_select.c @@ -202,6 +202,7 @@ block_check_for_allowed_instrs(nir_block *block, unsigned *count, case nir_intrinsic_load_const_ir3: case nir_intrinsic_ballot: case nir_intrinsic_ballot_relaxed: + case nir_intrinsic_mbcnt_amd: if (!alu_ok) return false; break;