From: David Edelsohn Date: Fri, 15 Jan 2016 23:04:23 +0000 (+0000) Subject: re PR target/68609 (PowerPC reciprocal estimate missed opportunities) X-Git-Tag: basepoints/gcc-7~1577 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28621a5c0255fc8f31e379df316828c5548680c2;p=thirdparty%2Fgcc.git re PR target/68609 (PowerPC reciprocal estimate missed opportunities) PR target/68609 * gcc.target/powerpc/recip-1.c: Adjust for Goldschmidt's Algorithm. * gcc.target/powerpc/recip-2.c: Same. * gcc.target/powerpc/recip-3.c: Same. * gcc.target/powerpc/recip-4.c: Same. * gcc.target/powerpc/recip-sqrtf.c: Same. From-SVN: r232456 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d9a92460ec1a..451003ac2c82 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2016-01-15 David Edelsohn + + PR target/68609 + * gcc.target/powerpc/recip-1.c: Adjust for Goldschmidt's Algorithm. + * gcc.target/powerpc/recip-2.c: Same. + * gcc.target/powerpc/recip-3.c: Same. + * gcc.target/powerpc/recip-4.c: Same. + * gcc.target/powerpc/recip-sqrtf.c: Same. + 2016-01-15 Jeff Law PR tree-optimization/69270 diff --git a/gcc/testsuite/gcc.target/powerpc/recip-1.c b/gcc/testsuite/gcc.target/powerpc/recip-1.c index 3c41d476a422..33df28e91985 100644 --- a/gcc/testsuite/gcc.target/powerpc/recip-1.c +++ b/gcc/testsuite/gcc.target/powerpc/recip-1.c @@ -3,9 +3,9 @@ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */ /* { dg-options "-O2 -mrecip -ffast-math -mcpu=power6" } */ /* { dg-final { scan-assembler-times "frsqrte" 2 } } */ -/* { dg-final { scan-assembler-times "fmsub" 2 } } */ -/* { dg-final { scan-assembler-times "fmul" 6 } } */ +/* { dg-final { scan-assembler-times "fmul" 4 } } */ /* { dg-final { scan-assembler-times "fnmsub" 3 } } */ +/* { dg-final { scan-assembler-times "fmadd" 4 } } */ double rsqrt_d (double a) diff --git a/gcc/testsuite/gcc.target/powerpc/recip-2.c b/gcc/testsuite/gcc.target/powerpc/recip-2.c index e841302a301e..bf8d96838b7d 100644 --- a/gcc/testsuite/gcc.target/powerpc/recip-2.c +++ b/gcc/testsuite/gcc.target/powerpc/recip-2.c @@ -3,9 +3,10 @@ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */ /* { dg-options "-O2 -mrecip -ffast-math -mcpu=power5" } */ /* { dg-final { scan-assembler-times "frsqrtes" 1 } } */ -/* { dg-final { scan-assembler-times "fmsubs" 1 } } */ -/* { dg-final { scan-assembler-times "fmuls" 6 } } */ +/* { dg-final { scan-assembler-times "fmuls" 2 } } */ /* { dg-final { scan-assembler-times "fnmsubs" 3 } } */ +/* { dg-final { scan-assembler-times "fmadds" 5 } } */ +/* { dg-final { scan-assembler-times "fadds" 1 } } */ /* { dg-final { scan-assembler-times "fsqrt" 1 } } */ /* power5 resqrte is not accurate enough, and should not be generated by diff --git a/gcc/testsuite/gcc.target/powerpc/recip-3.c b/gcc/testsuite/gcc.target/powerpc/recip-3.c index a1ed5c34e44c..e3496ab82b32 100644 --- a/gcc/testsuite/gcc.target/powerpc/recip-3.c +++ b/gcc/testsuite/gcc.target/powerpc/recip-3.c @@ -3,12 +3,12 @@ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ /* { dg-options "-O2 -mrecip -ffast-math -mcpu=power7" } */ /* { dg-final { scan-assembler-times "xsrsqrtedp\|frsqrte\ " 1 } } */ -/* { dg-final { scan-assembler-times "xsmsub.dp\|fmsub\ " 1 } } */ -/* { dg-final { scan-assembler-times "xsmuldp\|fmul\ " 4 } } */ +/* { dg-final { scan-assembler-times "xsmuldp\|fmul\ " 2 } } */ /* { dg-final { scan-assembler-times "xsnmsub.dp\|fnmsub\ " 2 } } */ +/* { dg-final { scan-assembler-times "xsmadd.dp\|fmadd\ " 3 } } */ /* { dg-final { scan-assembler-times "xsrsqrtesp\|frsqrtes" 1 } } */ -/* { dg-final { scan-assembler-times "xsmsub.sp\|fmsubs" 1 } } */ /* { dg-final { scan-assembler-times "xsmulsp\|fmuls" 2 } } */ +/* { dg-final { scan-assembler-times "xsmadd.sp\|fmadds" 1 } } */ /* { dg-final { scan-assembler-times "xsnmsub.sp\|fnmsubs" 1 } } */ double diff --git a/gcc/testsuite/gcc.target/powerpc/recip-4.c b/gcc/testsuite/gcc.target/powerpc/recip-4.c index 7d95cc97a9aa..54002d3c7a02 100644 --- a/gcc/testsuite/gcc.target/powerpc/recip-4.c +++ b/gcc/testsuite/gcc.target/powerpc/recip-4.c @@ -3,13 +3,13 @@ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ /* { dg-options "-O3 -ftree-vectorize -mrecip -ffast-math -mcpu=power7 -fno-unroll-loops" } */ /* { dg-final { scan-assembler-times "xvrsqrtedp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmsub.dp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmuldp" 4 } } */ +/* { dg-final { scan-assembler-times "xvmuldp" 2 } } */ /* { dg-final { scan-assembler-times "xvnmsub.dp" 2 } } */ +/* { dg-final { scan-assembler-times "xvmadd.dp" 3 } } */ /* { dg-final { scan-assembler-times "xvrsqrtesp" 1 } } */ -/* { dg-final { scan-assembler-times "xvmsub.sp" 1 } } */ /* { dg-final { scan-assembler-times "xvmulsp" 2 } } */ /* { dg-final { scan-assembler-times "xvnmsub.sp" 1 } } */ +/* { dg-final { scan-assembler-times "xvmadd.sp" 1 } } */ #define SIZE 1024 diff --git a/gcc/testsuite/gcc.target/powerpc/recip-sqrtf.c b/gcc/testsuite/gcc.target/powerpc/recip-sqrtf.c index 92798837e3e0..29839da8c14f 100644 --- a/gcc/testsuite/gcc.target/powerpc/recip-sqrtf.c +++ b/gcc/testsuite/gcc.target/powerpc/recip-sqrtf.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -ffast-math -mcpu=power5 -mrecip" } */ +/* { dg-options "-O2 -ffast-math -mcpu=power6 -mrecip" } */ extern float sqrtf (float);