From: Ian Romanick <ian.d.roman...@intel.com>

I don't intend to push this.  The results are pretty horrifying.

Broadwell
total instructions in shared programs: 15387998 -> 15383192 (-0.03%)
instructions in affected programs: 1223940 -> 1219134 (-0.39%)
helped: 700
HURT: 63
helped stats (abs) min: 1 max: 81 x̄: 7.68 x̃: 5
helped stats (rel) min: 0.14% max: 4.76% x̄: 0.77% x̃: 0.45%
HURT stats (abs)   min: 4 max: 83 x̄: 9.03 x̃: 6
HURT stats (rel)   min: 0.13% max: 4.02% x̄: 0.34% x̃: 0.20%
95% mean confidence interval for instructions value: -6.95 -5.64
95% mean confidence interval for instructions %-change: -0.72% -0.63%
Instructions are helped.

total cycles in shared programs: 600707435 -> 601996933 (0.21%)
cycles in affected programs: 137816437 -> 139105935 (0.94%)
helped: 195
HURT: 529
helped stats (abs) min: 1 max: 3666 x̄: 159.20 x̃: 18
helped stats (rel) min: 0.01% max: 32.80% x̄: 1.53% x̃: 0.46%
HURT stats (abs)   min: 1 max: 6711 x̄: 2496.30 x̃: 2865
HURT stats (rel)   min: <.01% max: 7.48% x̄: 1.15% x̃: 1.03%
95% mean confidence interval for cycles value: 1622.18 1939.97
95% mean confidence interval for cycles %-change: 0.26% 0.60%
Cycles are HURT.

total spills in shared programs: 80928 -> 81130 (0.25%)
spills in affected programs: 15915 -> 16117 (1.27%)
helped: 18
HURT: 63

total fills in shared programs: 93056 -> 93069 (0.01%)
fills in affected programs: 16050 -> 16063 (0.08%)
helped: 18
HURT: 63

Signed-off-by: Ian Romanick <ian.d.roman...@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 cada08d274d..984aa0ee35d 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -381,6 +381,10 @@ optimizations = [
    # so emit an open-coded version of that.
    (('bcsel@32', ('feq', a, 0.0), 1.0, ('i2f32', ('iadd', ('ineg', ('flt', 
0.0, 'a@32')), ('flt', 'a@32', 0.0)))),
     ('ior', 0x3f800000, ('iand', a, 0x80000000))),
+   (('bcsel@32', ('feq', a, 0.0), 1.0, ('fsign', a)),
+    ('ior', 0x3f800000, ('iand', a, 0x80000000))),
+
+   (('i2f32', ('iadd', ('ineg', ('flt', 0.0, 'a@32')), ('flt', 'a@32', 0.0))), 
('fsign', a)),
 
    (('ior', 'a@bool', ('ieq', a, False)), True),
    (('ior', 'a@bool', ('inot', a)), True),
-- 
2.14.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to