From d8ef28671d87107cbc23a98d5eb892762eaee9ca Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 28 Jan 2026 16:00:34 +0100 Subject: [PATCH] nir/opt_algebraic: use correct syntax to create exact fsat Fixes: 3b06824e4c4 ("nir/opt_algebraic: optimize some post peephole select patterns") Reviewed-by: Alyssa Rosenzweig Reviewed-by: Ian Romanick Part-of: --- src/compiler/nir/nir_opt_algebraic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 8dfd33bd739..baa6e57b5b2 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -783,8 +783,8 @@ optimizations.extend([ (('bcsel(is_only_used_as_float)', ('feq', a, 'b(is_not_zero)'), b, a), a), (('bcsel(is_only_used_as_float)', ('fneu', a, 'b(is_not_zero)'), a, b), a), - (('bcsel', ignore_exact('feq', a, 0), 0, ('fsat', ('fmul', a, 'b(is_a_number)'))), ('fsat!', ('fmul', a, b))), - (('bcsel', ignore_exact('fneu', a, 0), ('fsat', ('fmul', a, 'b(is_a_number)')), 0), ('fsat!', ('fmul', a, b))), + (('bcsel', ignore_exact('feq', a, 0), 0, ('fsat', ('fmul', a, 'b(is_a_number)'))), ('!fsat', ('fmul', a, b))), + (('bcsel', ignore_exact('fneu', a, 0), ('fsat', ('fmul', a, 'b(is_a_number)')), 0), ('!fsat', ('fmul', a, b))), (('bcsel', ignore_exact('feq', a, 0), b, ('fadd', a, 'b(is_not_zero)')), ('fadd', a, b)), (('bcsel', ignore_exact('fneu', a, 0), ('fadd', a, 'b(is_not_zero)'), b), ('fadd', a, b)),