public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Prevent the p5600-bonding.c test from being run for the n32 and 64 ABIs
@ 2015-07-22 14:21 Andrew Bennett
  2015-07-22 14:33 ` Matthew Fortune
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Bennett @ 2015-07-22 14:21 UTC (permalink / raw)
  To: gcc-patches
  Cc: Matthew Fortune, Moore, Catherine (Catherine_Moore@mentor.com)

Hi,

The MIPS p5600-bonding.c test is currently failing for the n32 and n64 
ABIs.  The test is checking if the load/store bonding patterns correctly 
match sequences of load/store instructions.  There are currently no load/store 
bonding patterns to match DI mode values.  For the n32 and n64 ABIs the code 
generated for the testcase produces DI mode load and stores; which means the 
load/store bonding patterns are not matched and the test fails.	

To fix this issue I have added a dg-skip-if option to the test to prevent it
from being run for the n32 and n64 ABIs.  When support for load/store bonding
for DI mode values has been added this can be removed.

The patch has been tested on the mti/img elf/linux-gnu toolchains, and
there have been no new regressions.

The patch and ChangeLog are below.

Ok to commit?


Many thanks,



Andrew


testsuite/
	gcc.target/mips/p5600-bonding.c (dg-skip-if): Don't run the test for the 
	n32 or n64 ABIs.
       
       
       
diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
index 0890ffa..20c26ca 100644
--- a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
+++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-dp -mtune=p5600  -mno-micromips -mno-mips16" } */
 /* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0" "-O1" } { "" } } */
+/* { dg-skip-if "There is no DI mode support for load/store bonding" { *-*-* } { "-mabi=n32" "-mabi=64" } { "" } } */
 typedef int VINT32 __attribute__ ((vector_size((16))));
 
 void

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

* RE: [PATCH] MIPS: Prevent the p5600-bonding.c test from being run for the n32 and 64 ABIs
  2015-07-22 14:21 [PATCH] MIPS: Prevent the p5600-bonding.c test from being run for the n32 and 64 ABIs Andrew Bennett
@ 2015-07-22 14:33 ` Matthew Fortune
  2015-09-02 13:55   ` Andrew Bennett
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Fortune @ 2015-07-22 14:33 UTC (permalink / raw)
  To: Andrew Bennett, gcc-patches; +Cc: Moore, Catherine (Catherine_Moore@mentor.com)

Andrew Bennett <Andrew.Bennett@imgtec.com> writes:
> diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> index 0890ffa..20c26ca 100644
> --- a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> +++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
>  /* { dg-options "-dp -mtune=p5600  -mno-micromips -mno-mips16" } */
>  /* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0" "-O1" } { "" } }
> */
> +/* { dg-skip-if "There is no DI mode support for load/store bonding" { *-*-* } { "-
> mabi=n32" "-mabi=64" } { "" } } */
>  typedef int VINT32 __attribute__ ((vector_size((16))));

If the best fix we can do for this test is to limit what it tests then we
should still not just skip it. There is some precedence for tests that
require a specific arch with the isa=loongson special case. I'd rather
just lock the test down to p5600 as per the filename.

Thanks,
Matthew

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

* RE: [PATCH] MIPS: Prevent the p5600-bonding.c test from being run for the n32 and 64 ABIs
  2015-07-22 14:33 ` Matthew Fortune
@ 2015-09-02 13:55   ` Andrew Bennett
  2016-01-20 14:42     ` Andrew Bennett
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Bennett @ 2015-09-02 13:55 UTC (permalink / raw)
  To: Matthew Fortune, gcc-patches
  Cc: Moore, Catherine (Catherine_Moore@mentor.com)

> > diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > index 0890ffa..20c26ca 100644
> > --- a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > +++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > @@ -1,6 +1,7 @@
> >  /* { dg-do compile } */
> >  /* { dg-options "-dp -mtune=p5600  -mno-micromips -mno-mips16" } */
> >  /* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0" "-
> O1" } { "" } }
> > */
> > +/* { dg-skip-if "There is no DI mode support for load/store bonding" { *-*-
> * } { "-
> > mabi=n32" "-mabi=64" } { "" } } */
> >  typedef int VINT32 __attribute__ ((vector_size((16))));
> 
> If the best fix we can do for this test is to limit what it tests then we
> should still not just skip it. There is some precedence for tests that
> require a specific arch with the isa=loongson special case. I'd rather
> just lock the test down to p5600 as per the filename.

I have changed the testcase's dg-options so that it is only built for p5600.
The updated patch and ChangeLog are below.  

Ok to commit?

Many thanks,



Andrew


testsuite/
	* gcc.target/mips/p5600-bonding.c (dg-options): Force the test to be always
	built for p5600.
	* gcc.target/mips/mips.exp (mips-dg-options): Add support for the isa=p5600
	dg-option.


diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp
index 42e7fff..e8d1895 100644
--- a/gcc/testsuite/gcc.target/mips/mips.exp
+++ b/gcc/testsuite/gcc.target/mips/mips.exp
@@ -142,6 +142,9 @@
 #   isa=loongson
 #      select a Loongson processor
 #
+#   isa=p5600
+#      select a P5600 processor
+#
 #   addressing=absolute
 #      force absolute addresses to be used
 #
@@ -1009,6 +1012,10 @@ proc mips-dg-options { args } {
            if { ![regexp {^-march=loongson} $arch] } {
                set arch "-march=loongson2f"
            }
+       } elseif { [string equal $spec "isa=p5600"] } {
+           if { ![regexp {^-march=p5600} $arch] } {
+               set arch "-march=p5600"
+           }
        } else {
            if { ![regexp {^(isa(?:|_rev))(=|<=|>=)([0-9]*)$} \
                       $spec dummy prop relation value nocpus] } {
diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
index 0890ffa..0bc6d91 100644
--- a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
+++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-dp -mtune=p5600  -mno-micromips -mno-mips16" } */
+/* { dg-options "-dp isa=p5600 -mtune=p5600 -mno-micromips -mno-mips16" } */
 /* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0" "-O1" } { "" } } */
 typedef int VINT32 __attribute__ ((vector_size((16))));

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

* RE: [PATCH] MIPS: Prevent the p5600-bonding.c test from being run for the n32 and 64 ABIs
  2015-09-02 13:55   ` Andrew Bennett
@ 2016-01-20 14:42     ` Andrew Bennett
  2016-01-27 22:16       ` Moore, Catherine
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Bennett @ 2016-01-20 14:42 UTC (permalink / raw)
  To: Matthew Fortune, gcc-patches
  Cc: Moore, Catherine (Catherine_Moore@mentor.com)

Ping.

Andrew

> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-owner@gcc.gnu.org] On
> Behalf Of Andrew Bennett
> Sent: 02 September 2015 14:55
> To: Matthew Fortune; gcc-patches@gcc.gnu.org
> Cc: Moore, Catherine (Catherine_Moore@mentor.com)
> Subject: RE: [PATCH] MIPS: Prevent the p5600-bonding.c test from being run for
> the n32 and 64 ABIs
> 
> > > diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > > b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > > index 0890ffa..20c26ca 100644
> > > --- a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > > +++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > > @@ -1,6 +1,7 @@
> > >  /* { dg-do compile } */
> > >  /* { dg-options "-dp -mtune=p5600  -mno-micromips -mno-mips16" } */
> > >  /* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0"
> "-
> > O1" } { "" } }
> > > */
> > > +/* { dg-skip-if "There is no DI mode support for load/store bonding" { *-
> *-
> > * } { "-
> > > mabi=n32" "-mabi=64" } { "" } } */
> > >  typedef int VINT32 __attribute__ ((vector_size((16))));
> >
> > If the best fix we can do for this test is to limit what it tests then we
> > should still not just skip it. There is some precedence for tests that
> > require a specific arch with the isa=loongson special case. I'd rather
> > just lock the test down to p5600 as per the filename.
> 
> I have changed the testcase's dg-options so that it is only built for p5600.
> The updated patch and ChangeLog are below.
> 
> Ok to commit?
> 
> Many thanks,
> 
> 
> 
> Andrew
> 
> 
> testsuite/
> 	* gcc.target/mips/p5600-bonding.c (dg-options): Force the test to be
> always
> 	built for p5600.
> 	* gcc.target/mips/mips.exp (mips-dg-options): Add support for the
> isa=p5600
> 	dg-option.
> 
> 
> diff --git a/gcc/testsuite/gcc.target/mips/mips.exp
> b/gcc/testsuite/gcc.target/mips/mips.exp
> index 42e7fff..e8d1895 100644
> --- a/gcc/testsuite/gcc.target/mips/mips.exp
> +++ b/gcc/testsuite/gcc.target/mips/mips.exp
> @@ -142,6 +142,9 @@
>  #   isa=loongson
>  #      select a Loongson processor
>  #
> +#   isa=p5600
> +#      select a P5600 processor
> +#
>  #   addressing=absolute
>  #      force absolute addresses to be used
>  #
> @@ -1009,6 +1012,10 @@ proc mips-dg-options { args } {
>             if { ![regexp {^-march=loongson} $arch] } {
>                 set arch "-march=loongson2f"
>             }
> +       } elseif { [string equal $spec "isa=p5600"] } {
> +           if { ![regexp {^-march=p5600} $arch] } {
> +               set arch "-march=p5600"
> +           }
>         } else {
>             if { ![regexp {^(isa(?:|_rev))(=|<=|>=)([0-9]*)$} \
>                        $spec dummy prop relation value nocpus] } {
> diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> index 0890ffa..0bc6d91 100644
> --- a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> +++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-dp -mtune=p5600  -mno-micromips -mno-mips16" } */
> +/* { dg-options "-dp isa=p5600 -mtune=p5600 -mno-micromips -mno-mips16" } */
>  /* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0" "-
> O1" } { "" } } */
>  typedef int VINT32 __attribute__ ((vector_size((16))));

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

* RE: [PATCH] MIPS: Prevent the p5600-bonding.c test from being run for the n32 and 64 ABIs
  2016-01-20 14:42     ` Andrew Bennett
@ 2016-01-27 22:16       ` Moore, Catherine
  2016-01-29 13:55         ` Andrew Bennett
  0 siblings, 1 reply; 6+ messages in thread
From: Moore, Catherine @ 2016-01-27 22:16 UTC (permalink / raw)
  To: Andrew Bennett, Matthew Fortune, gcc-patches



> -----Original Message-----
> From: Andrew Bennett [mailto:Andrew.Bennett@imgtec.com]
> Sent: Wednesday, January 20, 2016 9:42 AM
> To: Matthew Fortune; gcc-patches@gcc.gnu.org
> Cc: Moore, Catherine
> Subject: RE: [PATCH] MIPS: Prevent the p5600-bonding.c test from being run
> for the n32 and 64 ABIs
> 
> Ping.
> 

This is OK now.

> 
> > -----Original Message-----
> > From: gcc-patches-owner@gcc.gnu.org
> > [mailto:gcc-patches-owner@gcc.gnu.org] On Behalf Of Andrew Bennett
> > Sent: 02 September 2015 14:55
> > To: Matthew Fortune; gcc-patches@gcc.gnu.org
> > Cc: Moore, Catherine (Catherine_Moore@mentor.com)
> > Subject: RE: [PATCH] MIPS: Prevent the p5600-bonding.c test from being
> > run for the n32 and 64 ABIs
> >
> > > > diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > > > b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > > > index 0890ffa..20c26ca 100644
> > > > --- a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > > > +++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > > > @@ -1,6 +1,7 @@
> > > >  /* { dg-do compile } */
> > > >  /* { dg-options "-dp -mtune=p5600  -mno-micromips -mno-mips16" }
> > > > */
> > > >  /* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0"
> > "-
> > > O1" } { "" } }
> > > > */
> > > > +/* { dg-skip-if "There is no DI mode support for load/store
> > > > +bonding" { *-
> > *-
> > > * } { "-
> > > > mabi=n32" "-mabi=64" } { "" } } */  typedef int VINT32
> > > > __attribute__ ((vector_size((16))));
> > >
> > > If the best fix we can do for this test is to limit what it tests
> > > then we should still not just skip it. There is some precedence for
> > > tests that require a specific arch with the isa=loongson special
> > > case. I'd rather just lock the test down to p5600 as per the filename.
> >
> > I have changed the testcase's dg-options so that it is only built for p5600.
> > The updated patch and ChangeLog are below.
> >
> > Ok to commit?
> >
> > Many thanks,
> >
> >
> >
> > Andrew
> >
> >
> > testsuite/
> > 	* gcc.target/mips/p5600-bonding.c (dg-options): Force the test to be
> > always
> > 	built for p5600.
> > 	* gcc.target/mips/mips.exp (mips-dg-options): Add support for the
> > isa=p5600
> > 	dg-option.
> >
> >
> > diff --git a/gcc/testsuite/gcc.target/mips/mips.exp
> > b/gcc/testsuite/gcc.target/mips/mips.exp
> > index 42e7fff..e8d1895 100644
> > --- a/gcc/testsuite/gcc.target/mips/mips.exp
> > +++ b/gcc/testsuite/gcc.target/mips/mips.exp
> > @@ -142,6 +142,9 @@
> >  #   isa=loongson
> >  #      select a Loongson processor
> >  #
> > +#   isa=p5600
> > +#      select a P5600 processor
> > +#
> >  #   addressing=absolute
> >  #      force absolute addresses to be used
> >  #
> > @@ -1009,6 +1012,10 @@ proc mips-dg-options { args } {
> >             if { ![regexp {^-march=loongson} $arch] } {
> >                 set arch "-march=loongson2f"
> >             }
> > +       } elseif { [string equal $spec "isa=p5600"] } {
> > +           if { ![regexp {^-march=p5600} $arch] } {
> > +               set arch "-march=p5600"
> > +           }
> >         } else {
> >             if { ![regexp {^(isa(?:|_rev))(=|<=|>=)([0-9]*)$} \
> >                        $spec dummy prop relation value nocpus] } {
> > diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > index 0890ffa..0bc6d91 100644
> > --- a/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > +++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c
> > @@ -1,5 +1,5 @@
> >  /* { dg-do compile } */
> > -/* { dg-options "-dp -mtune=p5600  -mno-micromips -mno-mips16" } */
> > +/* { dg-options "-dp isa=p5600 -mtune=p5600 -mno-micromips
> > +-mno-mips16" } */
> >  /* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } {
> > "-O0" "- O1" } { "" } } */  typedef int VINT32 __attribute__
> > ((vector_size((16))));

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

* RE: [PATCH] MIPS: Prevent the p5600-bonding.c test from being run for the n32 and 64 ABIs
  2016-01-27 22:16       ` Moore, Catherine
@ 2016-01-29 13:55         ` Andrew Bennett
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Bennett @ 2016-01-29 13:55 UTC (permalink / raw)
  To: Moore, Catherine, Matthew Fortune, gcc-patches

> This is OK now.

Committed as SVN 232980.

Regards,



Andrew

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

end of thread, other threads:[~2016-01-29 13:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-22 14:21 [PATCH] MIPS: Prevent the p5600-bonding.c test from being run for the n32 and 64 ABIs Andrew Bennett
2015-07-22 14:33 ` Matthew Fortune
2015-09-02 13:55   ` Andrew Bennett
2016-01-20 14:42     ` Andrew Bennett
2016-01-27 22:16       ` Moore, Catherine
2016-01-29 13:55         ` Andrew Bennett

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