<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 13 April 2017 at 13:50, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.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 Thu, Apr 13, 2017 at 1:29 PM, Richard Smith via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: rsmith<br>
> Date: Thu Apr 13 15:29:59 2017<br>
> New Revision: 300252<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=300252&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=300252&view=rev</a><br>
> Log:<br>
> Remove all allocation and divisions from GreatestCommonDivisor<br>
><br>
> Switch from Euclid's algorithm to Stein's algorithm for computing GCD. This<br>
> avoids the (expensive) APInt division operation in favour of bit operations.<br>
> Remove all memory allocation from within the GCD loop by tweaking our `lshr`<br>
> implementation so it can operate in-place.<br>
<br>
</span>Cool!<br>
<span class=""><br>
> -/// \brief Compute GCD of two APInt values.<br>
> +/// \brief Compute GCD of two unsigned APInt values.<br>
>  ///<br>
>  /// This function returns the greatest common divisor of the two APInt values<br>
>  /// using Euclid's algorithm.<br>
<br>
</span>s/Euclid/Stein/ here?<br>
</blockquote></div><br></div><div class="gmail_extra">r300728.</div></div>