<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;"><div style="margin: 0px 0px 0px 4px;">Hi Adam,</div><div style="margin: 0px 0px 0px 4px;"><br></div><div style="margin: 0px 0px 0px 4px;">This LGTM with two comments:</div><div style="margin: 0px 0px 0px 4px;"><br></div><div style="margin: 0px 0px 0px 4px;">1. Could you add a comment on why this is not useful for AVX?</div><div style="margin: 0px 0px 0px 4px;"> +      if (Subtarget->hasAVX())</div><div style="margin: 0px 0px 0px 4px;"> +        break;</div><div style="margin: 0px 0px 0px 4px;"><br></div><div style="margin: 0px 0px 0px 4px;">2. As it is your CHECK-LABEL lines may cause failure on pecoff target, see r201931 on how to fix that.</div><div style="margin: 0px 0px 0px 4px;"><br></div><div style="margin: 0px 0px 0px 4px;">Thanks,</div><div style="margin: 0px 0px 0px 4px;"><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">-Quentin</span></div>
<br><div><div>On Feb 24, 2014, at 2:36 PM, Adam Nemet <<a href="mailto:anemet@apple.com">anemet@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">This is another improvement for SingleSource/Benchmarks/Misc/lowercase.c.<br><br>The current approach to lower a vsetult is to flip the sign bit of the operands, swap the operands and then use a (signed) pcmpgt.  psubus (unsigned saturating subtract) can be used to emulate a vsetult more efficiently:<br><br>+    case ISD::SETULT: {<br>+      // If the comparison is against a constant we can turn this into a<br>+      // setule.  With psubus, setule does not require a swap.  This is<br>+      // beneficial because the constant in the register is no longer<br>+      // destructed as the destination so it can be hoisted out of a loop.<br><br>I also enable lowering via psubus in a few other cases where it’s clearly beneficial: setule and setuge if minu/maxu cannot be used.  You can see the improvements in the diff to the existing test vec_setcc.ll.<br><br>I am leaving the other case alone for now because it’s harder to reason about profitability in those cases.<br><br>Tested on x86_64-apple-darwin.<br><br>Please apply if it looks good.<br><br>Adam<br><br><<a href="rdar://problem/14338765">rdar://problem/14338765</a>><br><br><span><vsetcc-psubus-v1.patch></span>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></body></html>