From 607f26814f52246820998612f3fa0ed85d841402 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Fri, 13 Mar 2026 09:54:17 +0100 Subject: [PATCH] nir/opt_algebraic: remove manual patterns that optimizes flt([0.0, 1.0], 0.0) Range analysis can figure this out. No Foz-DB changes. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_opt_algebraic.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index ff949d1d5b4..3456ce67c42 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1915,11 +1915,6 @@ optimizations.extend([ (('fmin(nsz)', 'a(is_a_number_not_negative)', 1.0), ('fsat', a), '!options->lower_fsat'), - # The result of the multiply must be in [-1, 0], so the result of the ffma - # must be in [0, 1]. - (('flt', ('fadd', ('fmul', ('fsat', a), ('fneg', ('fsat', a))), 1.0), 0.0), False), - (('flt', ('fadd', ('fneg', ('fmul', ('fsat', a), ('fsat', a))), 1.0), 0.0), False), - (('fneu', 'a(is_not_zero)', 0.0), True), (('feq', 'a(is_not_zero)', 0.0), False),