From 6068be543b6ed67847a463b805b7ffeefcf549ee Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 19 Oct 2018 12:43:43 -0500 Subject: [PATCH] nir/algebraic: Generalize an optimization MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There's nothing boolean about (a | ~a) ~> -1 Reviewed-by: Samuel Iglesias Gonsálvez --- src/compiler/nir/nir_opt_algebraic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index cc747250ba5..8b24daddfdc 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -373,7 +373,7 @@ optimizations = [ (('iand', ('uge(is_used_once)', a, c), ('uge', b, c)), ('uge', ('umin', a, b), c)), (('ior', 'a@bool', ('ieq', a, False)), True), - (('ior', 'a@bool', ('inot', a)), True), + (('ior', a, ('inot', a)), -1), (('iand', ('ieq', 'a@32', 0), ('ieq', 'b@32', 0)), ('ieq', ('ior', 'a@32', 'b@32'), 0)), -- 2.30.2