diff mbox series

[v2] testsuite/gcc.dg/tree-ssa/pr111456-1.c: Handle fallout

Message ID 20241208185701.E347E20415@pchp3.se.axis.com
State New
Headers show
Series [v2] testsuite/gcc.dg/tree-ssa/pr111456-1.c: Handle fallout | expand

Commit Message

Hans-Peter Nilsson Dec. 8, 2024, 6:57 p.m. UTC
v2: oops, typo: component is tree-optimization, not tree-ssa.
Resent for the benefit of autotesters that don't yet
understand natural language.

Forcing a fail and marking as xfail is IMHO better than
passing --param=logical-op-non-short-circuit=0 or #pragma
GCC unroll, making the test pass.  To wit, this makes it
observable when it's fixed.

Ok to commit?
-- >8 --
This is expected fallout from r15-5646-gd1cf0d7a0f27fd as
described by that commit.

	PR tree-optimization/117954
	* gcc.dg/tree-ssa/pr111456-1.c: Xfail and pass
	--param=logical-op-non-short-circuit=0.
---
 gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Sam James Dec. 8, 2024, 7:06 p.m. UTC | #1
Hans-Peter Nilsson <hp@axis.com> writes:

> v2: oops, typo: component is tree-optimization, not tree-ssa.
> Resent for the benefit of autotesters that don't yet
> understand natural language.
>
> Forcing a fail and marking as xfail is IMHO better than
> passing --param=logical-op-non-short-circuit=0 or #pragma

"better than ...=1", right?

> GCC unroll, making the test pass.  To wit, this makes it
> observable when it's fixed.
>
> Ok to commit?
> -- >8 --
> This is expected fallout from r15-5646-gd1cf0d7a0f27fd as
> described by that commit.
>
> 	PR tree-optimization/117954
> 	* gcc.dg/tree-ssa/pr111456-1.c: Xfail and pass
> 	--param=logical-op-non-short-circuit=0.
> ---
>  gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
> index ffff664a1afa..24984cd6c6b7 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -fdump-tree-optimized" } */
> +/* { dg-options "-O2 -fdump-tree-optimized --param logical-op-non-short-circuit=0" } */
>  /* PR tree-optimization/111456 */
>  
>  void foo(void);
> @@ -38,6 +38,6 @@ static signed char k(signed char m, short n) {
>  int main() { k(0 <= 0 > *j, i); }
>  
>  
> -/* { dg-final { scan-tree-dump-not "foo " "optimized" } } */
> +/* { dg-final { scan-tree-dump-not "foo " "optimized" { xfail *-*-* } } } */
>  /* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
Hans-Peter Nilsson Dec. 8, 2024, 7:20 p.m. UTC | #2
> From: Sam James <sam@gentoo.org>
> Date: Sun, 08 Dec 2024 19:06:12 +0000

> Hans-Peter Nilsson <hp@axis.com> writes:
> 
> > v2: oops, typo: component is tree-optimization, not tree-ssa.
> > Resent for the benefit of autotesters that don't yet
> > understand natural language.
> >
> > Forcing a fail and marking as xfail is IMHO better than
> > passing --param=logical-op-non-short-circuit=0 or #pragma
> 
> "better than ...=1", right?

You are correct.  I have to fill my quota of at least one
typo per mssage. :)

At least that one was above the scissors-line.

brgds, H-P


> 
> > GCC unroll, making the test pass.  To wit, this makes it
> > observable when it's fixed.
> >
> > Ok to commit?
> > -- >8 --
> > This is expected fallout from r15-5646-gd1cf0d7a0f27fd as
> > described by that commit.
> >
> > 	PR tree-optimization/117954
> > 	* gcc.dg/tree-ssa/pr111456-1.c: Xfail and pass
> > 	--param=logical-op-non-short-circuit=0.
> > ---
> >  gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
> > index ffff664a1afa..24984cd6c6b7 100644
> > --- a/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
> > +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
> > @@ -1,5 +1,5 @@
> >  /* { dg-do compile } */
> > -/* { dg-options "-O2 -fdump-tree-optimized" } */
> > +/* { dg-options "-O2 -fdump-tree-optimized --param logical-op-non-short-circuit=0" } */
> >  /* PR tree-optimization/111456 */
> >  
> >  void foo(void);
> > @@ -38,6 +38,6 @@ static signed char k(signed char m, short n) {
> >  int main() { k(0 <= 0 > *j, i); }
> >  
> >  
> > -/* { dg-final { scan-tree-dump-not "foo " "optimized" } } */
> > +/* { dg-final { scan-tree-dump-not "foo " "optimized" { xfail *-*-* } } } */
> >  /* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
>
Richard Biener Dec. 9, 2024, 9:06 a.m. UTC | #3
On Sun, Dec 8, 2024 at 7:58 PM Hans-Peter Nilsson <hp@axis.com> wrote:
>
> v2: oops, typo: component is tree-optimization, not tree-ssa.
> Resent for the benefit of autotesters that don't yet
> understand natural language.
>
> Forcing a fail and marking as xfail is IMHO better than
> passing --param=logical-op-non-short-circuit=0 or #pragma
> GCC unroll, making the test pass.  To wit, this makes it
> observable when it's fixed.
>
> Ok to commit?

As Andrew said the fix the testcase was written for was targeting
--param logical-op-non-short-circuit=1 it makes more sense to force
that so we continue to check it works.

We should simply track the failure to optimize with =0 in a new PR.

So, OK with avoiding the XFAIL and defaulting to =1.

Richard.

> -- >8 --
> This is expected fallout from r15-5646-gd1cf0d7a0f27fd as
> described by that commit.
>
>         PR tree-optimization/117954
>         * gcc.dg/tree-ssa/pr111456-1.c: Xfail and pass
>         --param=logical-op-non-short-circuit=0.
> ---
>  gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
> index ffff664a1afa..24984cd6c6b7 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -fdump-tree-optimized" } */
> +/* { dg-options "-O2 -fdump-tree-optimized --param logical-op-non-short-circuit=0" } */
>  /* PR tree-optimization/111456 */
>
>  void foo(void);
> @@ -38,6 +38,6 @@ static signed char k(signed char m, short n) {
>  int main() { k(0 <= 0 > *j, i); }
>
>
> -/* { dg-final { scan-tree-dump-not "foo " "optimized" } } */
> +/* { dg-final { scan-tree-dump-not "foo " "optimized" { xfail *-*-* } } } */
>  /* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
>
> --
> 2.30.2
>
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
index ffff664a1afa..24984cd6c6b7 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr111456-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fdump-tree-optimized --param logical-op-non-short-circuit=0" } */
 /* PR tree-optimization/111456 */
 
 void foo(void);
@@ -38,6 +38,6 @@  static signed char k(signed char m, short n) {
 int main() { k(0 <= 0 > *j, i); }
 
 
-/* { dg-final { scan-tree-dump-not "foo " "optimized" } } */
+/* { dg-final { scan-tree-dump-not "foo " "optimized" { xfail *-*-* } } } */
 /* { dg-final { scan-tree-dump "return 0;" "optimized" } } */