This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH , rs6000] Add missing builtin test cases, fix arguments to match specifications.


On Thu, 2018-05-17 at 15:31 -0500, Segher Boessenkool wrote:
> Hi!
> 
> On Wed, May 16, 2018 at 12:53:13PM -0700, Carl Love wrote:
> > diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-12.c
> > b/gcc/testsuite/gcc.target/powerpc/altivec-12.c
> > index b0267b5..1f3175f 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/altivec-12.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/altivec-12.c
> > @@ -18,7 +18,7 @@ vector char scz;
> >  vector unsigned char uca =
> > {0,4,8,1,5,9,2,6,10,3,7,11,15,12,14,13};
> >  vector unsigned char ucb =
> > {6,4,8,3,1,9,2,6,10,3,7,11,15,12,14,13};
> >  vector unsigned char uc_expected =
> > {3,4,8,2,3,9,2,6,10,3,7,11,15,12,14,13};
> > -vector char ucz;
> > +vector unsigned char ucz;
> 
> Why?  Was this a bug in the test case, does it quieten a warning?

I was actually just making the naming consistent with the rest of the
variable naming.  It doesn't impact the functionality.  The other
variables, uca, ucb for example have their types explicitly stated as 
"unsigned char" where the leading "u" stands for unsigned, "c"
represents char.  However, we have ucz as type char not explicitly
"unsigned char".  So, was just looking for consistency in the
name/declaration.

> 
> > diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c
> > b/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c
> > index 1e690be..f1eb78f 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c
> > @@ -1,4 +1,4 @@
> > -/* { dg-do compile { target powerpc*-*-* } } */
> > +/* { dg-do compile { target powerpc64-*-* } } */
> 
> This is not correct.  The target triple is the (canonical) name of
> the
> architecture the compiler is built for, but you can do for example
> powerpc64-linux-gcc -m32, because we are a biarch target; a typical
> way to test is

OK, wasn't thinking about the fact that the change makes it a 64-bit
only test.  The test is supposed to be for big endian, i.e. the name is
altivec-7-be.c.  We have another test file altivec-7-le.c for little
endian testing.  The change was trying to make it a BE only test but as
you point out, I lose the 32-bit testing.  The 32-bit mode will
obviously be BE.  The thinking was powerpc64-*-* restricts the test to
BE where as powerpc64le-*-* restricts the test to LE.  So I need to
qualify that on 64-bit I only want to run if I am on a 64-bit BE
system.  How can I do that?

> > diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1-le.c
> > b/gcc/testsuite/gcc.target/powerpc/builtins-1-le.c
> > index 2dd4953..c74c493 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/builtins-1-le.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/builtins-1-le.c
> > @@ -1,5 +1,5 @@
>  /* { dg-do compile { target { powerpc64le-*-* } } } */
> > -/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-
> > mcpu=*" } { "-mcpu=power8" } } */
> > +/* { dg-skip-if "do not override -mcpu" { powerpc64le-*-* } { "-
> > mcpu=*" } { "-mcpu=power8" } } */
> 
> This makes no difference, does it?  Please keep it as it was.

Ditto, trying to make this only run on LE as there is also a test file
builtins-1-be.c with  /* { dg-do compile { target { powerpc64-*-* } } }
*/ for testing on BE.  
> 
> > diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c
> > b/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c
> > index 2df9fca..85d57c8 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c
> > @@ -1,4 +1,4 @@
> > -/* { dg-do compile { target powerpc*-*-* } } */
> > +/* { dg-do compile { target powerpc64-*-* } } */
> >  /* { dg-require-effective-target powerpc_vsx_ok } */
> >  /* { dg-options "-mvsx" } */
> >  
> > @@ -27,21 +27,21 @@
> >  /* { dg-final { scan-assembler-times "vmulosb" 1 } } */
> >  
> >  // For LE platforms P9 and later, we generate the lxv insn instead
> > of lxvd2x.
> > -/* { dg-final { scan-assembler-times {\mlxvd2x\M}  0  { target { {
> > powerpc64*le-*-* } && { p9vector_hw } } } } } */
> > -/* { dg-final { scan-assembler-times {\mlxv\M}    36  { target { {
> > powerpc64*le-*-* } && { p9vector_hw } } } } } */
> > +/* { dg-final { scan-assembler-times {lxvd2x}  0  { target { {
> > powerpc64*le-*-* } && { p9vector_hw } } } } } */
> > +/* { dg-final { scan-assembler-times {lxv}    36  { target { {
> > powerpc64*le-*-* } && { p9vector_hw } } } } } */
> 
> This {lxv} matches {lxvd2x} as well.  \m\M in Tcl are like \b\b in
> Perl,
> or \<\> in many other regex dialects.

OK, went and looked that up, didn't realize that was what it was doing.
  

I can change powerpc64*le-*-* to powerpc64le-*-* and leave the rest
alone if you like.

                   Carl 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]