Mesa (master): nir: Recognize i2b(b2i(x)) as x.
Matt Turner
mattst88 at kemper.freedesktop.org
Thu May 7 18:03:16 UTC 2015
Module: Mesa
Branch: master
Commit: 8ae559971a692b417acb9fec04386e1e95c619ec
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ae559971a692b417acb9fec04386e1e95c619ec
Author: Matt Turner <mattst88 at gmail.com>
Date: Tue May 5 19:56:27 2015 -0700
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 at intel.com>
Reviewed-by: Glenn Kennard <glenn.kennard at gmail.com>
---
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 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)),
More information about the mesa-commit
mailing list