<div dir="auto">Rb (of you want another one)</div><div class="gmail_extra"><br><div class="gmail_quote">On Jan 7, 2017 3:59 AM, "Timothy Arceri" <<a href="mailto:timothy.arceri@collabora.com">timothy.arceri@collabora.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
<br>
On BDW:<br>
<br>
total instructions in shared programs: 13071119 -> 13070371 (-0.01%)<br>
instructions in affected programs: 83424 -> 82676 (-0.90%)<br>
helped: 505<br>
HURT: 45 (all TCS, all hurt by a single instruction)<br>
<br>
total cycles in shared programs: 256601322 -> 256588932 (-0.00%)<br>
cycles in affected programs: 819410 -> 807020 (-1.51%)<br>
helped: 450<br>
HURT: 57<br>
<br>
total loops in shared programs: 2950 -> 2942 (-0.27%)<br>
loops in affected programs: 8 -> 0<br>
helped: 7<br>
HURT: 0<br>
<br>
v2: Drop unnecessary 'a@bool' annotation (Connor, Eric).<br>
Add a comment explaining the rule (Ian).<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
Reviewed-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>> [v1]<br>
Reviewed-by: Timothy Arceri <<a href="mailto:timothy.arceri@collabora.com">timothy.arceri@collabora.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 ff10d70..3b8836e 100644<br>
--- a/src/compiler/nir/nir_opt_<wbr>algebraic.py<br>
+++ b/src/compiler/nir/nir_opt_<wbr>algebraic.py<br>
@@ -197,6 +197,8 @@ optimizations = [<br>
(('fmul', ('b2f', a), ('b2f', b)), ('b2f', ('iand', a, b))),<br>
(('fsat', ('fadd', ('b2f', a), ('b2f', b))), ('b2f', ('ior', a, b))),<br>
(('iand', 'a@bool', 1.0), ('b2f', a)),<br>
+ # True/False are ~0 and 0 in NIR. b2i of True is 1, and -1 is ~0 (True).<br>
+ (('ineg', ('b2i', a)), a),<br>
(('flt', ('fneg', ('b2f', a)), 0), a), # Generated by TGSI KILL_IF.<br>
(('flt', ('fsub', 0.0, ('b2f', a)), 0), a), # Generated by TGSI KILL_IF.<br>
# Comparison with the same args. Note that these are not done for<br>
--<br>
2.9.3<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>
</blockquote></div></div>