<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>Hi Sean,<div><br></div><div>Thanks for providing the feedback.</div><div>This patch will generate </div><div>xorl %ecx, %ecx</div><div>subl %edx, %eax</div><div>cmovsl %ecx, %eax</div><div>while the proposed sequence has a dependency chain from 1st instruction to 2nd then to 3rd.</div><div><br></div><div>-- Manman</div><div><br><div><div>On Apr 25, 2012, at 11:01 AM, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_extra">Why not turn it into e.g.</div><div class="gmail_extra"><br></div><div class="gmail_extra">cmp ebx, eax</div><div class="gmail_extra">cmovg ebx, eax</div><div class="gmail_extra">sub ebx, eax</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">?</div><div class="gmail_extra"><br></div><div class="gmail_extra">--Sean Silva</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Apr 25, 2012 at 12:33 PM, Manman Ren <span dir="ltr"><<a href="mailto:mren@apple.com" target="_blank">mren@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This patch is intended to optimize the following cases for x86:<br>
(b > a) ? (b-a) : 0<br>
(a < b) ? (b-a) : 0<br>
It will use cmovs in generated x86 code.<br>
<br>
The patch modified one source file: lib/Target/X86/X86ISelLowering.cpp<br>
<br>
Please review & provide feedback.<br>
Thanks,<br>
<br>
<br>_______________________________________________<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" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></body></html>