From 5b1405dcbfd31a12aede9375d164f5f4acdbf1cf Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Mon, 30 Mar 2026 16:39:51 +0200 Subject: [PATCH] nir/opt_algebraic: remove a few non 1bit bool patterns We almost exclusive optimize 1bit booleans nowadays, so I think these shouldn't be needed. Reviewed-by: Ian Romanick Part-of: --- src/compiler/nir/nir_opt_algebraic.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 9ca084fdb1b..4a04266185a 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1620,8 +1620,6 @@ optimizations.extend([ (('fsat', ('fadd', ('b2f', 'a@1'), ('b2f', 'b@1'))), ('b2f', ('ior', a, b))), (('fsat', ('fadd', ('b2f', 'a@1'), ('fneg', ('b2f', 'b@1')))), ('b2f', ('iand', a, ('inot', b)))), (('fmax', ('fadd', ('b2f', 'a@1'), ('fneg', ('b2f', 'b@1'))), 0.0), ('b2f', ('iand', a, ('inot', b)))), - (('iand', 'a@bool16', 1.0), ('b2f', a)), - (('iand', 'a@bool32', 1.0), ('b2f', a)), # For this optimization, there are a few things to consider: # The replacement must flush denorms, fcanonicalize/fneg takes care of that. @@ -3976,7 +3974,6 @@ late_optimizations += [ for s in [16, 32, 64]: late_optimizations.extend([ (('~fadd@{}'.format(s), 1.0, ('fmul(is_used_once)', c , ('fadd', b, -1.0 ))), ('fadd', ('fadd', 1.0, ('fneg', c)), ('fmul', b, c)), 'options->lower_flrp{}'.format(s)), - (('bcsel', a, 0, ('b2f{}'.format(s), ('inot', 'b@bool'))), ('b2f{}'.format(s), ('inot', ('ior', a, b)))), ]) for op in ['fadd']: