<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Though it would be optimized out by the compiler,<div>
how about removing also "w--" and "dst++"?</div></span><br><div class="gmail_quote">2011/9/23 Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
gcc isn't able to see that w is no greater than 1, so it generates<br>
unnecessary loop instructions with while (w).<br>
<br>
Signed-off-by: Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>><br>
---<br>
pixman/pixman-mmx.c | 10 +++++-----<br>
1 files changed, 5 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c<br>
index f835a14..6c57909 100644<br>
--- a/pixman/pixman-mmx.c<br>
+++ b/pixman/pixman-mmx.c<br>
@@ -1142,7 +1142,7 @@ mmx_composite_over_n_8888 (pixman_implementation_t *imp,<br>
<br>
CHECKPOINT ();<br>
<br>
- while (w)<br>
+ if (w)<br>
{<br>
*dst = store8888 (over (vsrc, vsrca, load8888 (*dst)));<br>
<br>
@@ -1383,7 +1383,7 @@ mmx_composite_over_8888_n_8888 (pixman_implementation_t *imp,<br>
src += 2;<br>
}<br>
<br>
- while (w)<br>
+ if (w)<br>
{<br>
__m64 s = load8888 (*src);<br>
__m64 d = load8888 (*dst);<br>
@@ -1758,7 +1758,7 @@ mmx_composite_over_n_8_8888 (pixman_implementation_t *imp,<br>
<br>
CHECKPOINT ();<br>
<br>
- while (w)<br>
+ if (w)<br>
{<br>
uint64_t m = *mask;<br>
<br>
@@ -2026,7 +2026,7 @@ mmx_composite_src_n_8_8888 (pixman_implementation_t *imp,<br>
<br>
CHECKPOINT ();<br>
<br>
- while (w)<br>
+ if (w)<br>
{<br>
uint64_t m = *mask;<br>
<br>
@@ -2366,7 +2366,7 @@ mmx_composite_over_pixbuf_8888 (pixman_implementation_t *imp,<br>
src += 2;<br>
}<br>
<br>
- while (w)<br>
+ if (w)<br>
{<br>
__m64 s = load8888 (*src);<br>
__m64 d = load8888 (*dst);<br>
<font color="#888888">--<br>
1.7.3.4<br>
<br>
_______________________________________________<br>
Pixman mailing list<br>
<a href="mailto:Pixman@lists.freedesktop.org">Pixman@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/pixman" target="_blank">http://lists.freedesktop.org/mailman/listinfo/pixman</a><br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<div>Taekyun Kim</div><br>