<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 14, 2013, at 11:36 AM, Benjamin Kramer <<a href="mailto:benny.kra@gmail.com">benny.kra@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>On 12.07.2013, at 02:04, Juergen Ributzka <<a href="mailto:juergen@apple.com">juergen@apple.com</a>> wrote:<br><br><blockquote type="cite">Hi,<br><br>there are no unsigned integer vector comparisons on x86. Therefore they are converted to signed comparisons that require flipping of the sign bits and sometimes negation of the result. There are two special cases that can be expressed with min/max instead and reduce the overall required instructions.<br><br>a <= b —> a == min(a,b)<br>a >= b —> a == max(a,b)<br><br>Depending on if SSE2 or SSE41 is available this can be applied to only i8 or i8/i16/i32 based vectors.<br><br>This patch is based on the idea from Ian Ollmann who originally suggested this improvement.<br><br>Please see the attached diff file for the patch to LowerVSETCC and a small test case.<br></blockquote><br>Nice trick! Patch looks good to me, do you have commit access?<br><br>- Ben<br></div></blockquote><div dir="auto"><br></div><div dir="auto">Hi Ben,</div><div dir="auto"><br></div><div dir="auto">I don’t have commit access yet. Let me check first if this trick is also profitable for ULT and UGT as suggested by Matti and revise the patch if necessary. I will also ask for commit access.</div><div dir="auto"><br></div><div dir="auto">Thanks</div><div dir="auto"><br></div><div dir="auto">-Juergen</div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br><blockquote type="cite"><br>Cheers,<br>Juergen<br><br><vec_setcc.diff>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></div></blockquote></div><br></body></html>