From 0066328cf161c4c53fc3f1ed2fa4ac778cdc1307 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Mon, 30 Mar 2026 14:15:32 +0200 Subject: [PATCH] nir/opt_algebraic: create more 64bit bit test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Foz-DB GFX1201: Totals from 2 (0.00% of 205032) affected shaders: Instrs: 3429 -> 3425 (-0.12%) CodeSize: 19580 -> 19568 (-0.06%) Latency: 13629 -> 13628 (-0.01%); split: -0.02%, +0.01% InvThroughput: 1853 -> 1847 (-0.32%) Copies: 235 -> 237 (+0.85%) VALU: 1901 -> 1898 (-0.16%) SALU: 381 -> 380 (-0.26%) VOPD: 307 -> 309 (+0.65%) Reviewed-by: Daniel Schürmann Part-of: --- src/compiler/nir/nir_opt_algebraic.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index f1db9880d59..90fabd487ba 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -3930,6 +3930,10 @@ late_optimizations.extend([ (('bitz', ('ishr', a, b), 0), ('bitz', a, b)), (('bitnz', ('ushr', a, b), 0), ('bitnz', a, b)), (('bitnz', ('ishr', a, b), 0), ('bitnz', a, b)), + (('bitz', ('unpack_64_2x32_split_x', ('ushr', a, b)), 0), ('bitz', a, b)), + (('bitz', ('unpack_64_2x32_split_x', ('ishr', a, b)), 0), ('bitz', a, b)), + (('bitnz', ('unpack_64_2x32_split_x', ('ushr', a, b)), 0), ('bitnz', a, b)), + (('bitnz', ('unpack_64_2x32_split_x', ('ishr', a, b)), 0), ('bitnz', a, b)), (('ine', ('ubfe', a, b, 1), 0), ('bitnz', a, b), 'options->has_bit_test'), (('ieq', ('ubfe', a, b, 1), 0), ('bitz', a, b), 'options->has_bit_test'), (('ine', ('ubfe', a, b, 1), 1), ('bitz', a, b), 'options->has_bit_test'),