diff options
author | Matt Turner <mattst88@gmail.com> | 2015-05-05 19:56:27 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2015-05-07 10:51:05 -0700 |
commit | 8ae559971a692b417acb9fec04386e1e95c619ec (patch) | |
tree | 3a690a17bec3d916f07ea4cc749c8780b93708cc | |
parent | 74697e2844a0850ef6b91fb4d34bfa3f6f4bff32 (diff) | |
download | external_mesa3d-8ae559971a692b417acb9fec04386e1e95c619ec.zip external_mesa3d-8ae559971a692b417acb9fec04386e1e95c619ec.tar.gz external_mesa3d-8ae559971a692b417acb9fec04386e1e95c619ec.tar.bz2 |
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 <jordan.l.justen@intel.com>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
-rw-r--r-- | src/glsl/nir/nir_opt_algebraic.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index 92928cf..fda4bd5 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)), |