public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] Fix AIX test case failures
@ 2018-06-22 21:55 Carl Love
  2018-06-25  9:44 ` Segher Boessenkool
  0 siblings, 1 reply; 11+ messages in thread
From: Carl Love @ 2018-06-22 21:55 UTC (permalink / raw)
  To: Segher Boessenkool, gcc-patches, David Edelsohn; +Cc: Bill Schmidt, cel

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(-)

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* } } } } */
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH, rs6000] Fix AIX test case failures
  2018-06-22 21:55 [PATCH, rs6000] Fix AIX test case failures Carl Love
@ 2018-06-25  9:44 ` Segher Boessenkool
  2018-06-25 16:53   ` Carl Love
  0 siblings, 1 reply; 11+ messages in thread
From: Segher Boessenkool @ 2018-06-25  9:44 UTC (permalink / raw)
  To: Carl Love; +Cc: gcc-patches, David Edelsohn, Bill Schmidt

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH, rs6000] Fix AIX test case failures
  2018-06-25  9:44 ` Segher Boessenkool
@ 2018-06-25 16:53   ` Carl Love
  2018-06-25 17:04     ` Segher Boessenkool
  0 siblings, 1 reply; 11+ messages in thread
From: Carl Love @ 2018-06-25 16:53 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-patches, David Edelsohn, Bill Schmidt

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH, rs6000] Fix AIX test case failures
  2018-06-25 16:53   ` Carl Love
@ 2018-06-25 17:04     ` Segher Boessenkool
  2018-07-13 14:51       ` David Edelsohn
  0 siblings, 1 reply; 11+ messages in thread
From: Segher Boessenkool @ 2018-06-25 17:04 UTC (permalink / raw)
  To: Carl Love; +Cc: gcc-patches, David Edelsohn, Bill Schmidt

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH, rs6000] Fix AIX test case failures
  2018-06-25 17:04     ` Segher Boessenkool
@ 2018-07-13 14:51       ` David Edelsohn
  2018-07-13 21:00         ` Segher Boessenkool
  0 siblings, 1 reply; 11+ messages in thread
From: David Edelsohn @ 2018-07-13 14:51 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Carl E. Love, GCC Patches, William J. Schmidt

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH, rs6000] Fix AIX test case failures
  2018-07-13 14:51       ` David Edelsohn
@ 2018-07-13 21:00         ` Segher Boessenkool
  2018-07-13 23:16           ` Carl Love
  0 siblings, 1 reply; 11+ messages in thread
From: Segher Boessenkool @ 2018-07-13 21:00 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Carl E. Love, GCC Patches, William J. Schmidt

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH, rs6000] Fix AIX test case failures
  2018-07-13 21:00         ` Segher Boessenkool
@ 2018-07-13 23:16           ` Carl Love
  2018-07-14  3:08             ` David Edelsohn
                               ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Carl Love @ 2018-07-13 23:16 UTC (permalink / raw)
  To: Segher Boessenkool, David Edelsohn; +Cc: GCC Patches, William J. Schmidt, cel

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* } } } } */
-- 
2.17.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH, rs6000] Fix AIX test case failures
  2018-07-13 23:16           ` Carl Love
@ 2018-07-14  3:08             ` David Edelsohn
  2018-07-16 19:59             ` Segher Boessenkool
  2018-07-17 23:40             ` Carl Love
  2 siblings, 0 replies; 11+ messages in thread
From: David Edelsohn @ 2018-07-14  3:08 UTC (permalink / raw)
  To: Carl E. Love; +Cc: Segher Boessenkool, GCC Patches, William J. Schmidt

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH, rs6000] Fix AIX test case failures
  2018-07-13 23:16           ` Carl Love
  2018-07-14  3:08             ` David Edelsohn
@ 2018-07-16 19:59             ` Segher Boessenkool
  2018-07-17 23:40             ` Carl Love
  2 siblings, 0 replies; 11+ messages in thread
From: Segher Boessenkool @ 2018-07-16 19:59 UTC (permalink / raw)
  To: Carl Love; +Cc: David Edelsohn, GCC Patches, William J. Schmidt

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH, rs6000] Fix AIX test case failures
  2018-07-13 23:16           ` Carl Love
  2018-07-14  3:08             ` David Edelsohn
  2018-07-16 19:59             ` Segher Boessenkool
@ 2018-07-17 23:40             ` Carl Love
  2018-07-18 21:51               ` Segher Boessenkool
  2 siblings, 1 reply; 11+ messages in thread
From: Carl Love @ 2018-07-17 23:40 UTC (permalink / raw)
  To: Segher Boessenkool, David Edelsohn; +Cc: GCC Patches, William J. Schmidt

Segher:

I was requested to backport the patch for the AIX test case failures to
GCC 8.  The trunk patch applied cleanly to GCC 8.  I updated the
changelog patch, built and retested the patch 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 it is OK to apply the patch to the GCC 8 branch. 
Thanks.

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


gcc/testsuite/ChangeLog:

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

	Backport from mainline
	2018-07-16  Carl Love  <cel@us.ibm.com>

	PR target/86414
 	* 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 d3fcbed..e34ed40 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 45695fe..c0fda8b 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 25f4bc6..14f9448 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 9ba577a..eee6de9 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 db87301..b6d2bdf 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 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* } } } } */
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH, rs6000] Fix AIX test case failures
  2018-07-17 23:40             ` Carl Love
@ 2018-07-18 21:51               ` Segher Boessenkool
  0 siblings, 0 replies; 11+ messages in thread
From: Segher Boessenkool @ 2018-07-18 21:51 UTC (permalink / raw)
  To: Carl Love; +Cc: David Edelsohn, GCC Patches, William J. Schmidt

Hi Carl,

On Tue, Jul 17, 2018 at 04:39:58PM -0700, Carl Love wrote:
> I was requested to backport the patch for the AIX test case failures to
> GCC 8.  The trunk patch applied cleanly to GCC 8.  I updated the
> changelog patch, built and retested the patch 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 it is OK to apply the patch to the GCC 8 branch. 

Sure, it's okay.  Thanks!


Segher


> 2018-07-17  Carl Love  <cel@us.ibm.com>
> 
> 	Backport from mainline
> 	2018-07-16  Carl Love  <cel@us.ibm.com>
> 
> 	PR target/86414
>  	* 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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-07-18 21:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22 21:55 [PATCH, rs6000] Fix AIX test case failures Carl Love
2018-06-25  9:44 ` Segher Boessenkool
2018-06-25 16:53   ` Carl Love
2018-06-25 17:04     ` Segher Boessenkool
2018-07-13 14:51       ` David Edelsohn
2018-07-13 21:00         ` Segher Boessenkool
2018-07-13 23:16           ` Carl Love
2018-07-14  3:08             ` David Edelsohn
2018-07-16 19:59             ` Segher Boessenkool
2018-07-17 23:40             ` Carl Love
2018-07-18 21:51               ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).