From: Matt Turner Date: Wed, 6 May 2015 02:56:27 +0000 (-0700) Subject: nir: Recognize i2b(b2i(x)) as x. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ae559971a692b417acb9fec04386e1e95c619ec;p=mesa.git nir: Recognize i2b(b2i(x)) as x. Helps the same set of programs as the previous commit. instructions in affected programs: 4490 -> 4346 (-3.21%) helped: 8 Reviewed-by: Jordan Justen Reviewed-by: Glenn Kennard --- diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index 92928cf3a1d..fda4bd5b6ff 100644 --- a/src/glsl/nir/nir_opt_algebraic.py +++ b/src/glsl/nir/nir_opt_algebraic.py @@ -188,6 +188,7 @@ optimizations = [ (('fcsel', a, b, b), b), # Conversions + (('i2b', ('b2i', a)), a), (('f2i', ('ftrunc', a)), ('f2i', a)), (('f2u', ('ftrunc', a)), ('f2u', a)),