diff mbox series

[rs6000] Fix AIX test case failures

Message ID 1529704544.7264.13.camel@us.ibm.com
State New
Headers show
Series [rs6000] Fix AIX test case failures | expand

Commit Message

Carl Love June 22, 2018, 9:55 p.m. UTC
GCC Maintainers:

The following patch addresses test failures on AIX.  

The patch has been tested on 

    powerpc64le-unknown-linux-gnu (Power 8 LE)  
    powerpc64-unknown-linux-gnu (Power 8 BE)
    AIX 7200-00-01-1543 (Power 8 BE)

With no regressions.

Please let me know if the patch looks OK for GCC mainline. 

                         Carl Love
----------------------------------------------------------------------

gcc/testsuite/ChangeLog:

2018-06-22  Carl Love  <cel@us.ibm.com>

 	* gcc.target/powerpc/divkc3-2.c: Make check Linux and AIX specific.
	* gcc.target/powerpc/divkc3-3.c: Make check Linux and AIX specific.
	* gcc.target/powerpc/fold-vec-mergehl-double.c: Update counts.
 	* gcc.target/powerpc/mulkc3-2.c: Make check Linux and AIX specific.
	* gcc.target/powerpc/mulkc3-3.c: Make check Linux and AIX specific.
	* gcc.target/powerpc/pr85456.c: Make check Linux and AIX specific.
---
 gcc/testsuite/gcc.target/powerpc/divkc3-2.c                | 3 ++-
 gcc/testsuite/gcc.target/powerpc/divkc3-3.c                | 3 ++-
 gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c | 5 ++---
 gcc/testsuite/gcc.target/powerpc/mulkc3-2.c                | 3 ++-
 gcc/testsuite/gcc.target/powerpc/mulkc3-3.c                | 3 ++-
 gcc/testsuite/gcc.target/powerpc/pr85456.c                 | 3 ++-
 6 files changed, 12 insertions(+), 8 deletions(-)

Comments

Segher Boessenkool June 25, 2018, 9:44 a.m. UTC | #1
Hi Carl,

On Fri, Jun 22, 2018 at 02:55:44PM -0700, Carl Love wrote:
> --- a/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> +++ b/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> @@ -13,4 +13,5 @@ divide (cld_t *p, cld_t *q, cld_t *r)
>    *p = *q / *r;
>  }
>  
> -/* { dg-final { scan-assembler "bl __divkc3" } } */
> +/* { dg-final { scan-assembler "bl __divkc3" { target { powerpc*-*-linux* } } } } */
> +/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-*-aix* } } } } */

Should it be calling __divdc3 on AIX, is that correct?

> --- a/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
> +++ b/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
> @@ -13,4 +13,5 @@ divide (cld_t *p, cld_t *q, cld_t *r)
>    *p = *q / *r;
>  }
>  
> -/* { dg-final { scan-assembler "bl __divtc3" } } */
> +/* { dg-final { scan-assembler "bl __divtc3" { target { powerpc*-*-linux* } } } } */
> +/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-*-aix* } } } } */

Same question here.  If the AIX port cannot handle -mabi=ieeelongdouble
it shouldn't silently accept it, etc.

> diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
> index 25f4bc6..403876d 100644
> --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
> +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
> @@ -19,7 +19,6 @@ testd_h (vector double vd2, vector double vd3)
>    return vec_mergeh (vd2, vd3);
>  }
>  
> -/* vec_merge with doubles tend to just use xxpermdi (3 ea for BE, 1 ea for LE).  */
> -/* { dg-final { scan-assembler-times "xxpermdi" 2  { target { powerpc*le-*-* } }    } } */
> -/* { dg-final { scan-assembler-times "xxpermdi" 6  { target { powerpc-*-* } }     } } */
> +/* { dg-final { scan-assembler-times "xxpermdi" 2 } } */
> +
>  

Is this change correct?  The test didn't fail on BE Linux (neither 32-bit
nor 64-bit) as far as I know.


Segher
Carl Love June 25, 2018, 4:53 p.m. UTC | #2
On Mon, 2018-06-25 at 04:44 -0500, Segher Boessenkool wrote:
> Hi Carl,
> 
> On Fri, Jun 22, 2018 at 02:55:44PM -0700, Carl Love wrote:
> > --- a/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> > @@ -13,4 +13,5 @@ divide (cld_t *p, cld_t *q, cld_t *r)
> >    *p = *q / *r;
> >  }
> >  
> > -/* { dg-final { scan-assembler "bl __divkc3" } } */
> > +/* { dg-final { scan-assembler "bl __divkc3" { target { powerpc*-
> > *-linux* } } } } */
> > +/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-
> > *-aix* } } } } */
> 
> Should it be calling __divdc3 on AIX, is that correct?

I was a bit surprised that it wasn't calling divkc3.  I am guessing
these are library routines we are calling?  I couldn't find the source
code for them and don't really know what the difference is between
divkc3 and divdc3.

The source for divkc3-2.c is:

    /* { dg-do compile { target { powerpc*-*-* } } } */
    /* { dg-require-effective-target powerpc_p8vector_ok } */
    /* { dg-options "-O2 -mpower8-vector -mabi=ieeelongdouble -Wno-psabi" } */

    /* Check that complex multiply generates the right call when long double is     
       IEEE 128-bit floating point.  */

    typedef _Complex long double cld_t;

    void
    divide (cld_t *p, cld_t *q, cld_t *r)
    {
      *p = *q / *r;
    }

    /* { dg-final { scan-assembler "bl __divkc3" { target { powerpc*-*-linux* } } } } */
    /* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-*-aix* } } } } */

When compiled as:

gcc -S -c -O2 -mpower8-vector -mabi=ieeelongdouble -Wno-psabi divkc3-.c

I get:

        .file   "divkc3-2.c"
        .toc
        .csect .text[PR]
        .align 2
        .align 4
        .globl divide
        .globl .divide
        .csect divide[DS]
divide:
        .long .divide, TOC[tc0], 0
        .csect .text[PR]
.divide:
        mflr 0
        stw 31,-4(1)
        lfd 4,8(5)
        stw 0,8(1)
        lfd 3,0(5)
        mr 31,3
        stwu 1,-80(1)
        lfd 2,8(4)
        lfd 1,0(4)
        bl .__divdc3
        nop
        addi 1,1,80
        lwz 0,8(1)
        stfd 1,0(31)
        stfd 2,8(31)
        lwz 31,-4(1)
        mtlr 0
        blr
LT..divide:
        .long 0
        .byte 0,0,32,65,128,1,3,0
        .long 0
        .long LT..divide-.divide
        .short 6
        .byte "divide"
        .align 2
_section_.text:
        .csect .data[RW],4
        .long _section_.text

Again, running the regression test, the test passes with the AIX value.
 
So, not sure why AIX and Linux are not calling the name for the
function or if what is being called is functionally equivalent?
> 
> > --- a/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
> > @@ -13,4 +13,5 @@ divide (cld_t *p, cld_t *q, cld_t *r)
> >    *p = *q / *r;
> >  }
> >  
> > -/* { dg-final { scan-assembler "bl __divtc3" } } */
> > +/* { dg-final { scan-assembler "bl __divtc3" { target { powerpc*-
> > *-linux* } } } } */
> > +/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-
> > *-aix* } } } } */
> 
> Same question here.  If the AIX port cannot handle
> -mabi=ieeelongdouble
> it shouldn't silently accept it, etc.

Ditto above comments, don't know about the -mabi=ieeelongdouble.  

I will play around with and without the mabi=ieeelongdouble on AIX and
Linux to see what happens.  
> 
> > diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-
> > double.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-
> > double.c
> > index 25f4bc6..403876d 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
> > @@ -19,7 +19,6 @@ testd_h (vector double vd2, vector double vd3)
> >    return vec_mergeh (vd2, vd3);
> >  }
> >  
> > -/* vec_merge with doubles tend to just use xxpermdi (3 ea for BE,
> > 1 ea for LE).  */
> > -/* { dg-final { scan-assembler-times "xxpermdi" 2  { target {
> > powerpc*le-*-* } }    } } */
> > -/* { dg-final { scan-assembler-times "xxpermdi" 6  { target {
> > powerpc-*-* } }     } } */
> > +/* { dg-final { scan-assembler-times "xxpermdi" 2 } } */
> > +
> >  
> 
> Is this change correct?  The test didn't fail on BE Linux (neither
> 32-bit
> nor 64-bit) as far as I know.

As I recall, my testing on the various systems did give me an error
without the change.  I was using Willow 8 (P8 BE), genoa (P8 LE) and
gcc119 for AIX.  I will go back and re-verify.

                    Carl Love
Segher Boessenkool June 25, 2018, 5:04 p.m. UTC | #3
On Mon, Jun 25, 2018 at 09:53:17AM -0700, Carl Love wrote:
> On Mon, 2018-06-25 at 04:44 -0500, Segher Boessenkool wrote:
> > On Fri, Jun 22, 2018 at 02:55:44PM -0700, Carl Love wrote:
> > > --- a/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> > > +++ b/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> > > @@ -13,4 +13,5 @@ divide (cld_t *p, cld_t *q, cld_t *r)
> > >    *p = *q / *r;
> > >  }
> > >  
> > > -/* { dg-final { scan-assembler "bl __divkc3" } } */
> > > +/* { dg-final { scan-assembler "bl __divkc3" { target { powerpc*-
> > > *-linux* } } } } */
> > > +/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-
> > > *-aix* } } } } */
> > 
> > Should it be calling __divdc3 on AIX, is that correct?
> 
> I was a bit surprised that it wasn't calling divkc3.  I am guessing
> these are library routines we are calling?  I couldn't find the source
> code for them and don't really know what the difference is between
> divkc3 and divdc3.

divkc3 is for KCmode, that is the complex mode for KFmode (128-bit IEEE).
divdc3 is for DCmode, that is the complex mode for DFmode (64-bit IEEE,
that is, "double").

I think this is the same as PR82625, for which I have a patch in testing.

> So, not sure why AIX and Linux are not calling the name for the
> function or if what is being called is functionally equivalent?

AIX uses 64-bit long double by default, and GCC has a bug with that and
-mabi=ieeelongdouble and __ieee128.

It thinks __ieee128 is the same as long double if it has -mabi=ieeelongdouble,
but that is not always true.  So it ends up using the long double type for
__ieee128, but that is just double precision float in this case.

So, hang on :-)


Segher
David Edelsohn July 13, 2018, 2:51 p.m. UTC | #4
On Mon, Jun 25, 2018 at 1:04 PM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> On Mon, Jun 25, 2018 at 09:53:17AM -0700, Carl Love wrote:
> > On Mon, 2018-06-25 at 04:44 -0500, Segher Boessenkool wrote:
> > > On Fri, Jun 22, 2018 at 02:55:44PM -0700, Carl Love wrote:
> > > > --- a/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> > > > +++ b/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> > > > @@ -13,4 +13,5 @@ divide (cld_t *p, cld_t *q, cld_t *r)
> > > >    *p = *q / *r;
> > > >  }
> > > >
> > > > -/* { dg-final { scan-assembler "bl __divkc3" } } */
> > > > +/* { dg-final { scan-assembler "bl __divkc3" { target { powerpc*-
> > > > *-linux* } } } } */
> > > > +/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-
> > > > *-aix* } } } } */
> > >
> > > Should it be calling __divdc3 on AIX, is that correct?
> >
> > I was a bit surprised that it wasn't calling divkc3.  I am guessing
> > these are library routines we are calling?  I couldn't find the source
> > code for them and don't really know what the difference is between
> > divkc3 and divdc3.
>
> divkc3 is for KCmode, that is the complex mode for KFmode (128-bit IEEE).
> divdc3 is for DCmode, that is the complex mode for DFmode (64-bit IEEE,
> that is, "double").
>
> I think this is the same as PR82625, for which I have a patch in testing.
>
> > So, not sure why AIX and Linux are not calling the name for the
> > function or if what is being called is functionally equivalent?
>
> AIX uses 64-bit long double by default, and GCC has a bug with that and
> -mabi=ieeelongdouble and __ieee128.
>
> It thinks __ieee128 is the same as long double if it has -mabi=ieeelongdouble,
> but that is not always true.  So it ends up using the long double type for
> __ieee128, but that is just double precision float in this case.

On AIX it would be calling divtc3, but AIX defaults to 64 bit long
double.  Either all of these tests need

/* { dg-require-effective-target longdouble128 } */

or

/* { dg-additional-options "-mlong-double-128" { target powerpc-ibm-aix* } } */

along with testing for "tc", e.g., bl .__divtc3

Thanks, David
Segher Boessenkool July 13, 2018, 9 p.m. UTC | #5
On Fri, Jul 13, 2018 at 10:51:24AM -0400, David Edelsohn wrote:
> On AIX it would be calling divtc3, but AIX defaults to 64 bit long
> double.  Either all of these tests need
> 
> /* { dg-require-effective-target longdouble128 } */
> 
> or
> 
> /* { dg-additional-options "-mlong-double-128" { target powerpc-ibm-aix* } } */
> 
> along with testing for "tc", e.g., bl .__divtc3

Which would you prefer David?  (I'd do the former).


Segher
Carl Love July 13, 2018, 11:15 p.m. UTC | #6
On Fri, 2018-07-13 at 16:00 -0500, Segher Boessenkool wrote:
> On Fri, Jul 13, 2018 at 10:51:24AM -0400, David Edelsohn wrote:
> > On AIX it would be calling divtc3, but AIX defaults to 64 bit long
> > double.  Either all of these tests need
> > 
> > /* { dg-require-effective-target longdouble128 } */
> > 
> > or
> > 
> > /* { dg-additional-options "-mlong-double-128" { target powerpc-
> > ibm-aix* } } */
> > 
> > along with testing for "tc", e.g., bl .__divtc3
> 
> Which would you prefer David?  (I'd do the former).
> 
> 
> Segher
> 

Segher, David:

I reworked the patch per the first option that David gave.  The tests
divkc3-2.c, divkc3-3.c, mulkc3-2.c and mulkc3-3.c pass on Power 9 Linux
as they did before.  The tests are unsupported on Power8 Linux as they
were before.  Now, the tests are reported as unsupported on AIX rather
then failing on AIX.

Please let me know if you both approve the updated patch below.  Thanks
for the input and help on this.

                   Carl Love

-----------------------------------------------------------------------

gcc/testsuite/ChangeLog:

2018-07-13  Carl Love  <cel@us.ibm.com>

 	* gcc.target/powerpc/divkc3-2.c: Add dg-require-effective-target
	longdouble128.
	* gcc.target/powerpc/divkc3-3.c: Ditto.
 	* gcc.target/powerpc/mulkc3-2.c: Ditto.
	* gcc.target/powerpc/mulkc3-3.c: Ditto.
	* gcc.target/powerpc/fold-vec-mergehl-double.c: Update counts.
	* gcc.target/powerpc/pr85456.c: Make check Linux and AIX specific.
---
 gcc/testsuite/gcc.target/powerpc/divkc3-2.c                | 1 +
 gcc/testsuite/gcc.target/powerpc/divkc3-3.c                | 1 +
 gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c | 4 +---
 gcc/testsuite/gcc.target/powerpc/mulkc3-2.c                | 1 +
 gcc/testsuite/gcc.target/powerpc/mulkc3-3.c                | 1 +
 gcc/testsuite/gcc.target/powerpc/pr85456.c                 | 3 ++-
 6 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/divkc3-2.c b/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
index d3fcbedac..e34ed40ba 100644
--- a/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-require-effective-target longdouble128 } */
 /* { dg-options "-O2 -mpower8-vector -mabi=ieeelongdouble -Wno-psabi" } */
 
 /* Check that complex multiply generates the right call when long double is
diff --git a/gcc/testsuite/gcc.target/powerpc/divkc3-3.c b/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
index 45695fef8..c0fda8b24 100644
--- a/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-require-effective-target longdouble128 } */
 /* { dg-options "-O2 -mpower8-vector -mabi=ibmlongdouble -Wno-psabi" } */
 
 /* Check that complex multiply generates the right call when long double is
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
index 25f4bc6aa..14f944817 100644
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
@@ -19,7 +19,5 @@ testd_h (vector double vd2, vector double vd3)
   return vec_mergeh (vd2, vd3);
 }
 
-/* vec_merge with doubles tend to just use xxpermdi (3 ea for BE, 1 ea for LE).  */
-/* { dg-final { scan-assembler-times "xxpermdi" 2  { target { powerpc*le-*-* } }    } } */
-/* { dg-final { scan-assembler-times "xxpermdi" 6  { target { powerpc-*-* } }     } } */
+/* { dg-final { scan-assembler-times "xxpermdi" 2 } } */
 
diff --git a/gcc/testsuite/gcc.target/powerpc/mulkc3-2.c b/gcc/testsuite/gcc.target/powerpc/mulkc3-2.c
index 9ba577a0c..eee6de9e2 100644
--- a/gcc/testsuite/gcc.target/powerpc/mulkc3-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/mulkc3-2.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-require-effective-target longdouble128 } */
 /* { dg-options "-O2 -mpower8-vector -mabi=ieeelongdouble -Wno-psabi" } */
 
 /* Check that complex multiply generates the right call when long double is
diff --git a/gcc/testsuite/gcc.target/powerpc/mulkc3-3.c b/gcc/testsuite/gcc.target/powerpc/mulkc3-3.c
index db8730158..b6d2bdf73 100644
--- a/gcc/testsuite/gcc.target/powerpc/mulkc3-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/mulkc3-3.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-require-effective-target longdouble128 } */
 /* { dg-options "-O2 -mpower8-vector -mabi=ibmlongdouble -Wno-psabi" } */
 
 /* Check that complex multiply generates the right call when long double is
diff --git a/gcc/testsuite/gcc.target/powerpc/pr85456.c b/gcc/testsuite/gcc.target/powerpc/pr85456.c
index b9df16a2b..b928292b8 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr85456.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr85456.c
@@ -11,4 +11,5 @@ do_powl (long double a, int i)
   return __builtin_powil (a, i);
 }
 
-/* { dg-final { scan-assembler "bl __powikf2" } } */
+/* { dg-final { scan-assembler "bl __powikf2" { target { powerpc*-*-linux* } } } } */
+/* { dg-final { scan-assembler "bl .__powidf2" { target { powerpc*-*-aix* } } } } */
David Edelsohn July 14, 2018, 3:08 a.m. UTC | #7
On Fri, Jul 13, 2018 at 7:15 PM Carl Love <cel@us.ibm.com> wrote:
>
> On Fri, 2018-07-13 at 16:00 -0500, Segher Boessenkool wrote:
> > On Fri, Jul 13, 2018 at 10:51:24AM -0400, David Edelsohn wrote:
> > > On AIX it would be calling divtc3, but AIX defaults to 64 bit long
> > > double.  Either all of these tests need
> > >
> > > /* { dg-require-effective-target longdouble128 } */
> > >
> > > or
> > >
> > > /* { dg-additional-options "-mlong-double-128" { target powerpc-
> > > ibm-aix* } } */
> > >
> > > along with testing for "tc", e.g., bl .__divtc3
> >
> > Which would you prefer David?  (I'd do the former).
> >
> >
> > Segher
> >
>
> Segher, David:
>
> I reworked the patch per the first option that David gave.  The tests
> divkc3-2.c, divkc3-3.c, mulkc3-2.c and mulkc3-3.c pass on Power 9 Linux
> as they did before.  The tests are unsupported on Power8 Linux as they
> were before.  Now, the tests are reported as unsupported on AIX rather
> then failing on AIX.
>
> Please let me know if you both approve the updated patch below.  Thanks
> for the input and help on this.
>
>                    Carl Love
>
> -----------------------------------------------------------------------
>
> gcc/testsuite/ChangeLog:
>
> 2018-07-13  Carl Love  <cel@us.ibm.com>
>
>         * gcc.target/powerpc/divkc3-2.c: Add dg-require-effective-target
>         longdouble128.
>         * gcc.target/powerpc/divkc3-3.c: Ditto.
>         * gcc.target/powerpc/mulkc3-2.c: Ditto.
>         * gcc.target/powerpc/mulkc3-3.c: Ditto.
>         * gcc.target/powerpc/fold-vec-mergehl-double.c: Update counts.
>         * gcc.target/powerpc/pr85456.c: Make check Linux and AIX specific.
> ---
>  gcc/testsuite/gcc.target/powerpc/divkc3-2.c                | 1 +
>  gcc/testsuite/gcc.target/powerpc/divkc3-3.c                | 1 +
>  gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c | 4 +---
>  gcc/testsuite/gcc.target/powerpc/mulkc3-2.c                | 1 +
>  gcc/testsuite/gcc.target/powerpc/mulkc3-3.c                | 1 +
>  gcc/testsuite/gcc.target/powerpc/pr85456.c                 | 3 ++-
>  6 files changed, 7 insertions(+), 4 deletions(-)

Hi, Carl

This is essentially what I have been testing with today.

This is okay.

Thanks, David
Segher Boessenkool July 16, 2018, 7:59 p.m. UTC | #8
On Fri, Jul 13, 2018 at 04:15:26PM -0700, Carl Love wrote:
> Segher, David:
> 
> I reworked the patch per the first option that David gave.  The tests
> divkc3-2.c, divkc3-3.c, mulkc3-2.c and mulkc3-3.c pass on Power 9 Linux
> as they did before.  The tests are unsupported on Power8 Linux as they
> were before.  Now, the tests are reported as unsupported on AIX rather
> then failing on AIX.
> 
> Please let me know if you both approve the updated patch below.  Thanks
> for the input and help on this.

You need only one approval ;-)

(The patch is fine.  Thanks!)


Segher



> 2018-07-13  Carl Love  <cel@us.ibm.com>
> 
>  	* gcc.target/powerpc/divkc3-2.c: Add dg-require-effective-target
> 	longdouble128.
> 	* gcc.target/powerpc/divkc3-3.c: Ditto.
>  	* gcc.target/powerpc/mulkc3-2.c: Ditto.
> 	* gcc.target/powerpc/mulkc3-3.c: Ditto.
> 	* gcc.target/powerpc/fold-vec-mergehl-double.c: Update counts.
> 	* gcc.target/powerpc/pr85456.c: Make check Linux and AIX specific.
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/divkc3-2.c b/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
index d3fcbed..79d9157 100644
--- a/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
@@ -13,4 +13,5 @@  divide (cld_t *p, cld_t *q, cld_t *r)
   *p = *q / *r;
 }
 
-/* { dg-final { scan-assembler "bl __divkc3" } } */
+/* { dg-final { scan-assembler "bl __divkc3" { target { powerpc*-*-linux* } } } } */
+/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-*-aix* } } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/divkc3-3.c b/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
index 45695fe..462e77f 100644
--- a/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/divkc3-3.c
@@ -13,4 +13,5 @@  divide (cld_t *p, cld_t *q, cld_t *r)
   *p = *q / *r;
 }
 
-/* { dg-final { scan-assembler "bl __divtc3" } } */
+/* { dg-final { scan-assembler "bl __divtc3" { target { powerpc*-*-linux* } } } } */
+/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-*-aix* } } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
index 25f4bc6..403876d 100644
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c
@@ -19,7 +19,6 @@  testd_h (vector double vd2, vector double vd3)
   return vec_mergeh (vd2, vd3);
 }
 
-/* vec_merge with doubles tend to just use xxpermdi (3 ea for BE, 1 ea for LE).  */
-/* { dg-final { scan-assembler-times "xxpermdi" 2  { target { powerpc*le-*-* } }    } } */
-/* { dg-final { scan-assembler-times "xxpermdi" 6  { target { powerpc-*-* } }     } } */
+/* { dg-final { scan-assembler-times "xxpermdi" 2 } } */
+
 
diff --git a/gcc/testsuite/gcc.target/powerpc/mulkc3-2.c b/gcc/testsuite/gcc.target/powerpc/mulkc3-2.c
index 9ba577a..f3ba80e 100644
--- a/gcc/testsuite/gcc.target/powerpc/mulkc3-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/mulkc3-2.c
@@ -13,4 +13,5 @@  multiply (cld_t *p, cld_t *q, cld_t *r)
   *p = *q * *r;
 }
 
-/* { dg-final { scan-assembler "bl __mulkc3" } } */
+/* { dg-final { scan-assembler "bl __mulkc3" { target { powerpc*-*-linux* } } } } */
+/* { dg-final { scan-assembler "bl .__muldc3" { target { powerpc*-*-aix* } } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/mulkc3-3.c b/gcc/testsuite/gcc.target/powerpc/mulkc3-3.c
index db87301..0c27dea 100644
--- a/gcc/testsuite/gcc.target/powerpc/mulkc3-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/mulkc3-3.c
@@ -13,4 +13,5 @@  multiply (cld_t *p, cld_t *q, cld_t *r)
   *p = *q * *r;
 }
 
-/* { dg-final { scan-assembler "bl __multc3" } } */
+/* { dg-final { scan-assembler "bl __multc3" { target { powerpc*-*-linux* } } } } */
+/* { dg-final { scan-assembler "bl .__muldc3" { target { powerpc*-*-aix* } } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr85456.c b/gcc/testsuite/gcc.target/powerpc/pr85456.c
index b9df16a..b928292 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr85456.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr85456.c
@@ -11,4 +11,5 @@  do_powl (long double a, int i)
   return __builtin_powil (a, i);
 }
 
-/* { dg-final { scan-assembler "bl __powikf2" } } */
+/* { dg-final { scan-assembler "bl __powikf2" { target { powerpc*-*-linux* } } } } */
+/* { dg-final { scan-assembler "bl .__powidf2" { target { powerpc*-*-aix* } } } } */