<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 6, 2016 at 3:52 PM, Rafael Espíndola via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 6 October 2016 at 18:47, David Majnemer <<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>> wrote:<br>
> Is alignTo actually showing up in profiles of real world code?<br>
<br>
</span>Not significantly. The numbers I posted are for lld. I just noticed it<br>
because there was a call to alignTo close to a hot code path, but divq<br>
seems to be really fast on Intel when the right hand side is a power<br>
of 2.<br></blockquote><div><br></div><div>How did you measure this / where did you learn this? Last I looked, most CPU's do integer division via an iterative algorithm. Ignoring microcode costs, IIRC Haswell produces 4 bits of the quotient per cycle, and Jaguar 2 bits of the quotient per cycle.</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
Rafael<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>