[Mesa-dev] [PATCH 10/10] nir: Don't abs slt and friends

Ian Romanick idr at freedesktop.org
Thu Mar 10 18:25:19 UTC 2016


From: Ian Romanick <ian.d.romanick at intel.com>

No shader-db changes, but this is symmetric with the previous commit.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/compiler/nir/nir_opt_algebraic.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 1a0bdd0..0c64b09 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -133,6 +133,10 @@ optimizations = [
    (('ior', ('flt', a, c), ('flt', b, c)), ('flt', ('fmin', a, b), c)),
    (('ior', ('fge', a, b), ('fge', a, c)), ('fge', a, ('fmin', b, c))),
    (('ior', ('fge', a, c), ('fge', b, c)), ('fge', ('fmax', a, b), c)),
+   (('fabs', ('slt', a, b)), ('slt', a, b)),
+   (('fabs', ('sge', a, b)), ('sge', a, b)),
+   (('fabs', ('seq', a, b)), ('seq', a, b)),
+   (('fabs', ('sne', a, b)), ('sne', a, b)),
    (('slt', a, b), ('b2f', ('flt', a, b)), 'options->lower_scmp'),
    (('sge', a, b), ('b2f', ('fge', a, b)), 'options->lower_scmp'),
    (('seq', a, b), ('b2f', ('feq', a, b)), 'options->lower_scmp'),
-- 
2.5.0



More information about the mesa-dev mailing list