From a70f63ab20d8bf922a307a92020237b1dec36314 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 31 Jul 2015 09:12:48 -0700 Subject: [PATCH] nir: Add algebraic opt for no-op iand. I lazily generated some of these in VC4 NIR lowering. Reviewed-by: Iago Toral Quiroga --- src/glsl/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index 3068445cbfe..d7c17403f9f 100644 --- a/src/glsl/nir/nir_opt_algebraic.py +++ b/src/glsl/nir/nir_opt_algebraic.py @@ -132,6 +132,7 @@ optimizations = [ # Logical and bit operations (('fand', a, 0.0), 0.0), (('iand', a, a), a), + (('iand', a, ~0), a), (('iand', a, 0), 0), (('ior', a, a), a), (('ior', a, 0), a), -- 2.30.2