<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 23, 2018 at 3:55 PM, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
<br>
shader-db results:<br>
<br>
Haswell, Broadwell, and Skylake had similar results. (Skylake shown)<br>
total instructions in shared programs: 14514817 -> 14514808 (<.01%)<br>
instructions in affected programs: 229 -> 220 (-3.93%)<br>
helped: 3<br>
HURT: 0<br>
helped stats (abs) min: 1 max: 4 x̄: 3.00 x̃: 4<br>
helped stats (rel) min: 2.86% max: 4.12% x̄: 3.70% x̃: 4.12%<br>
<br>
total cycles in shared programs: 533145211 -> 533144939 (<.01%)<br>
cycles in affected programs: 37268 -> 36996 (-0.73%)<br>
helped: 8<br>
HURT: 0<br>
helped stats (abs) min: 2 max: 134 x̄: 34.00 x̃: 2<br>
helped stats (rel) min: 0.02% max: 14.22% x̄: 3.53% x̃: 0.05%<br>
<br>
Sandy Bridge and Ivy Bridge had similar results. (Ivy Bridge shown)<br>
total cycles in shared programs: 257618409 -> 257618403 (<.01%)<br>
cycles in affected programs: 12582 -> 12576 (-0.05%)<br>
helped: 3<br>
HURT: 0<br>
helped stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2<br>
helped stats (rel) min: 0.05% max: 0.05% x̄: 0.05% x̃: 0.05%<br>
<br>
No changes on Iron Lake or GM45.<br>
<br>
Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
---<br>
 src/compiler/nir/nir_opt_<wbr>algebraic.py | 2 ++<br>
 1 file changed, 2 insertions(+)<br>
<br>
diff --git a/src/compiler/nir/nir_opt_<wbr>algebraic.py b/src/compiler/nir/nir_opt_<wbr>algebraic.py<br>
index d40d59b..f5f9e94 100644<br>
--- a/src/compiler/nir/nir_opt_<wbr>algebraic.py<br>
+++ b/src/compiler/nir/nir_opt_<wbr>algebraic.py<br>
@@ -170,6 +170,8 @@ optimizations = [<br>
    (('fge', ('fneg', ('fabs', a)), 0.0), ('feq', a, 0.0)),<br>
    (('bcsel', ('flt', b, a), b, a), ('fmin', a, b)),<br>
    (('bcsel', ('flt', a, b), b, a), ('fmax', a, b)),<br>
+   (('bcsel', ('fge', b, a), a, b), ('fmin', a, b)),<br>
+   (('bcsel', ('fge', a, b), a, b), ('fmax', a, b)),<br></blockquote><div><br></div><div>Please flag as inexact.  As per the stupid GLSL definition, these are not the same as fmin/fmax when you throw in a NaN.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    (('bcsel', ('inot', a), b, c), ('bcsel', a, c, b)),<br>
    (('bcsel', a, ('bcsel', a, b, c), d), ('bcsel', a, b, d)),<br>
    (('bcsel', a, True, 'b@bool'), ('ior', a, b)),<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.5<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>