Message ID | 1507584474.26707.146.camel@brimstone.rchland.ibm.com |
---|---|
State | New |
Headers | show |
Series | [rs6000] fix-up int128 fold vector multiply tests | expand |
Hi Will, On Mon, Oct 09, 2017 at 04:27:54PM -0500, Will Schmidt wrote: > Fix up a few issues with the tests. > - add -O2 to int128-p8 test, and firm up the -mcpu options > - update the set of expected instructions for the int128-p9 test. > - replace the float128_hw requirement with power8_vector_ok > for the int128-p9 test. > -/* { dg-final { scan-assembler-times "\[ \t\]mulld " 6 } } */ > +/* { dg-final { scan-assembler-times "\[ \t\]mulld" 6 } } */ Why this? (Better/easier would be to use \m and \M btw.) > diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c > index e81ea5f..a226ae0 100644 > --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c > +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c > @@ -1,10 +1,10 @@ > /* Verify that overloaded built-ins for vec_mul with __int128 > inputs produce the right results. */ > > /* { dg-do compile } */ > -/* { dg-require-effective-target powerpc_float128_hw_ok } */ > +/* { dg-require-effective-target powerpc_p8vector_ok } */ > /* { dg-require-effective-target int128 } */ > /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ > /* { dg-options "-mcpu=power9 -O2" } */ > /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */ This looks curious, too. With the change it will no longer work if you built GCC with a version of binutils that doesn't support p9, I think? Not that people should do that. Segher
On Mon, 2017-10-09 at 17:22 -0500, Segher Boessenkool wrote: > Hi Will, > > On Mon, Oct 09, 2017 at 04:27:54PM -0500, Will Schmidt wrote: > > Fix up a few issues with the tests. > > - add -O2 to int128-p8 test, and firm up the -mcpu options > > - update the set of expected instructions for the int128-p9 test. > > - replace the float128_hw requirement with power8_vector_ok > > for the int128-p9 test. > > > -/* { dg-final { scan-assembler-times "\[ \t\]mulld " 6 } } */ > > +/* { dg-final { scan-assembler-times "\[ \t\]mulld" 6 } } */ > > Why this? (Better/easier would be to use \m and \M btw.) hmm, yeah, intended this to be a whitespace cleanup but that was in error. The dg-final section now reads as: /* { dg-final { scan-assembler-times {\mmulld\M} 6 } } */ /* { dg-final { scan-assembler-times {\mmulhdu\M} 2 } } */ > > > diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c > > index e81ea5f..a226ae0 100644 > > --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c > > +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c > > @@ -1,10 +1,10 @@ > > /* Verify that overloaded built-ins for vec_mul with __int128 > > inputs produce the right results. */ > > > > /* { dg-do compile } */ > > -/* { dg-require-effective-target powerpc_float128_hw_ok } */ > > +/* { dg-require-effective-target powerpc_p8vector_ok } */ > > /* { dg-require-effective-target int128 } */ > > /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ > > /* { dg-options "-mcpu=power9 -O2" } */ > > /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */ > > This looks curious, too. With the change it will no longer work if you > built GCC with a version of binutils that doesn't support p9, I think? > Not that people should do that. Right. On at least one (older) system i've got I do trigger an error, before making this change. cc1: warning: will not generate power9 instructions because assembler lacks power9 support. so the intent is to clear that one up. The check on this one should probably be for p9 vector though. > +/* { dg-require-effective-target powerpc_p9vector_ok } */ So.. [v2]. :-) ---><--- [PATCH, rs6000] fix-up int128 fold vector multiply tests Fix up a few issues with the tests. - add -O2 to int128-p8 test, and firm up the -mcpu and -mpower*-vector options - update the set of expected instructions for the int128-p9 test. - remove the float128_hw requirement from the int128-p9 test. 2017-10-10 Will Schmidt <will_schmidt@vnet.ibm.com> * gcc.target/powerpc/fold-vec-mult-int128-p8.c: Update options * gcc.target/powerpc/fold-vec-mult-int128-p9.c: Update expected instruction list. diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c index 97d6b945..b1cf0a7 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c @@ -3,11 +3,12 @@ /* { dg-do compile } */ /* { dg-require-effective-target powerpc_p8vector_ok } */ /* { dg-require-effective-target int128 } */ /* { dg-require-effective-target lp64 } */ -/* { dg-options "-mpower8-vector" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ +/* { dg-options "-mpower8-vector -mcpu=power8 -O2" } */ /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */ #include "altivec.h" vector signed __int128 @@ -20,7 +21,7 @@ vector unsigned __int128 test2 (vector unsigned __int128 x, vector unsigned __int128 y) { return vec_mul (x, y); } -/* { dg-final { scan-assembler-times "\[ \t\]mulld " 6 } } */ -/* { dg-final { scan-assembler-times "\[ \t\]mulhdu" 2 } } */ +/* { dg-final { scan-assembler-times {\mmulld\M} 6 } } */ +/* { dg-final { scan-assembler-times {\mmulhdu\M} 2 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c index e81ea5f..6571884 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c @@ -1,13 +1,13 @@ /* Verify that overloaded built-ins for vec_mul with __int128 inputs produce the right results. */ /* { dg-do compile } */ -/* { dg-require-effective-target powerpc_float128_hw_ok } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ /* { dg-require-effective-target int128 } */ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ -/* { dg-options "-mcpu=power9 -O2" } */ +/* { dg-options "-mpower9-vector -mcpu=power9 -O2" } */ /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */ #include "altivec.h" vector signed __int128 @@ -20,6 +20,7 @@ vector unsigned __int128 test2 (vector unsigned __int128 x, vector unsigned __int128 y) { return vec_mul (x, y); } -/* { dg-final { scan-assembler-times "\[ \t\]xsmulqp" 2 } } */ +/* { dg-final { scan-assembler-times {\mmulld\M} 4 } } */ +/* { dg-final { scan-assembler-times {\mmulhdu\M} 2 } } */
On Tue, Oct 10, 2017 at 10:52:37AM -0500, Will Schmidt wrote: > [PATCH, rs6000] fix-up int128 fold vector multiply tests > > Fix up a few issues with the tests. > - add -O2 to int128-p8 test, and firm up the -mcpu and -mpower*-vector options > - update the set of expected instructions for the int128-p9 test. > - remove the float128_hw requirement from the int128-p9 test. > > 2017-10-10 Will Schmidt <will_schmidt@vnet.ibm.com> > * gcc.target/powerpc/fold-vec-mult-int128-p8.c: Update options > * gcc.target/powerpc/fold-vec-mult-int128-p9.c: Update expected > instruction list. Thanks for the update. This looks fine I think; okay for trunk. Segher
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c index 97d6b945..5ced2cd 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c @@ -3,11 +3,12 @@ /* { dg-do compile } */ /* { dg-require-effective-target powerpc_p8vector_ok } */ /* { dg-require-effective-target int128 } */ /* { dg-require-effective-target lp64 } */ -/* { dg-options "-mpower8-vector" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ +/* { dg-options "-mpower8-vector -mcpu=power8 -O2" } */ /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */ #include "altivec.h" vector signed __int128 @@ -20,7 +21,7 @@ vector unsigned __int128 test2 (vector unsigned __int128 x, vector unsigned __int128 y) { return vec_mul (x, y); } -/* { dg-final { scan-assembler-times "\[ \t\]mulld " 6 } } */ +/* { dg-final { scan-assembler-times "\[ \t\]mulld" 6 } } */ /* { dg-final { scan-assembler-times "\[ \t\]mulhdu" 2 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c index e81ea5f..a226ae0 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c @@ -1,10 +1,10 @@ /* Verify that overloaded built-ins for vec_mul with __int128 inputs produce the right results. */ /* { dg-do compile } */ -/* { dg-require-effective-target powerpc_float128_hw_ok } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ /* { dg-require-effective-target int128 } */ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ /* { dg-options "-mcpu=power9 -O2" } */ /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */ @@ -20,6 +20,7 @@ vector unsigned __int128 test2 (vector unsigned __int128 x, vector unsigned __int128 y) { return vec_mul (x, y); } -/* { dg-final { scan-assembler-times "\[ \t\]xsmulqp" 2 } } */ +/* { dg-final { scan-assembler-times "\[ \t\]mulld" 4 } } */ +/* { dg-final { scan-assembler-times "\[ \t\]mulhdu" 2 } } */