<div dir="auto">Rb</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: 13074882 -> 13068703 (-0.05%)<br>
instructions in affected programs: 1823116 -> 1816937 (-0.34%)<br>
helped: 4187<br>
HURT: 537<br>
<br>
total cycles in shared programs: 256622718 -> 256425382 (-0.08%)<br>
cycles in affected programs: 123790120 -> 123592784 (-0.16%)<br>
helped: 3823<br>
HURT: 2037<br>
<br>
total spills in shared programs: 15276 -> 14929 (-2.27%)<br>
spills in affected programs: 9446 -> 9099 (-3.67%)<br>
helped: 352<br>
HURT: 1<br>
<br>
total fills in shared programs: 20496 -> 20144 (-1.72%)<br>
fills in affected programs: 13040 -> 12688 (-2.70%)<br>
helped: 352<br>
HURT: 1<br>
<br>
LOST: 2<br>
GAINED: 21<br>
<br>
v2: Rely on 'a' being a well-formed boolean (Connor, Eric).<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><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 | 4 ++++<br>
1 file changed, 4 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 3b8836e..434881f 100644<br>
--- a/src/compiler/nir/nir_opt_<wbr>algebraic.py<br>
+++ b/src/compiler/nir/nir_opt_<wbr>algebraic.py<br>
@@ -269,6 +269,10 @@ optimizations = [<br>
(('ieq', 'a@bool', False), ('inot', 'a')),<br>
(('bcsel', a, True, False), a),<br>
(('bcsel', a, False, True), ('inot', a)),<br>
+ (('bcsel@32', a, 1.0, 0.0), ('b2f', a)),<br>
+ (('bcsel@32', a, 0.0, 1.0), ('b2f', ('inot', a))),<br>
+ (('bcsel@32', a, -1.0, -0.0), ('fneg', ('b2f', a))),<br>
+ (('bcsel@32', a, -0.0, -1.0), ('fneg', ('b2f', ('inot', a)))),<br>
(('bcsel', True, b, c), b),<br>
(('bcsel', False, b, c), c),<br>
# The result of this should be hit by constant propagation and, in the<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>