[PATCH, PowerPC] Fix PR 56843

David Edelsohn dje.gcc@gmail.com
Fri Apr 5 20:50:00 GMT 2013


On Fri, Apr 5, 2013 at 1:49 PM, Bill Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> This patch improves code generation for Newton-Raphson reciprocal
> estimates for divide and square root on PowerPC
> (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56843).
>
> For the divide case, we formerly had specialized routines for two- and
> three-pass estimates.  Rather than add new routines for one- and
> four-pass estimates, I removed those and rewrote the algorithm to be
> general for any number of passes.  This unfortunately makes the patch
> hard to read.  It will probably be easiest to review by applying it to a
> tree and looking at the whole rs6000_emit_swdiv function.
>
> Bootstrapped and tested on powerpc64-unknown-linux-gnu with no new
> regressions.  Ok for trunk?
>
> Thanks,
> Bill
>
>
> gcc:
>
> 2013-04-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
>         PR target/56843
>         * config/rs6000/rs6000.c (rs6000_emit_swdiv_high_precision): Remove.
>         (rs6000_emit_swdiv_low_precision): Remove.
>         (rs6000_emit_swdiv): Rewrite to handle between one and four
>         iterations of Newton-Raphson generally; modify required number of
>         iterations for some cases.
>         * config/rs6000/rs6000.h (RS6000_RECIP_HIGH_PRECISION_P): Remove.
>
> gcc/testsuite:
>
> 2013-04-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
>         PR target/56843
>         * gcc.target/powerpc/recip-1.c: Modify expected output.
>         * gcc.target/powerpc/recip-3.c: Likewise.
>         * gcc.target/powerpc/recip-4.c: Likewise.
>         * gcc.target/powerpc/recip-5.c: Add expected output for iterations.

Okay.

Thanks, David



More information about the Gcc-patches mailing list