[Mesa-dev] [PATCH 10/13] nir: Transform expressions of b2f(a) and b2f(b) to a && b
Ian Romanick
idr at freedesktop.org
Thu Aug 2 18:19:20 UTC 2018
From: Ian Romanick <ian.d.romanick at intel.com>
No changes on any Gen platform.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/compiler/nir/nir_opt_algebraic.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 64400f92ddc..629cae5f381 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -170,6 +170,9 @@ optimizations = [
(('fne', ('fmin', ('b2f', a), ('b2f', b)), 0.0), ('ior', a, b)),
(('fne', ('bcsel', a, 1.0, ('b2f', b)) , 0.0), ('ior', a, b)),
(('fne', ('b2f', a), ('fneg', ('b2f', b))), ('ior', a, b)),
+ (('fne', ('fmul', ('b2f', a), ('b2f', b)), 0.0), ('iand', a, b)),
+ (('fne', ('fmax', ('b2f', a), ('b2f', b)), 0.0), ('iand', a, b)),
+ (('fne', ('bcsel', a, ('b2f', b), 0.0) , 0.0), ('iand', a, b)),
(('feq', ('fadd', ('b2f', a), ('b2f', b)), 0.0), ('inot', ('ior', a, b))),
(('feq', ('fmin', ('b2f', a), ('b2f', b)), 0.0), ('inot', ('ior', a, b))),
(('feq', ('bcsel', a, 1.0, ('b2f', b)) , 0.0), ('inot', ('ior', a, b))),
--
2.14.4
More information about the mesa-dev
mailing list