diff options
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index dec81509f05..0b1c13e8675 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1129,6 +1129,9 @@ optimizations.extend([ (('fge', 'a(is_a_number)', a), True), (('feq', 'a(is_a_number)', a), True), (('fneu', 'a(is_a_number)', a), False), + # Other optimizations can reduce a == a when logically joined with other + # comparisons even when a might not be a number. + (('fge', a, a), ('feq', a, a)), # Logical and bit operations (('iand', a, a), a), (('iand', a, ~0), a), |