public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR tree-optimization/71314
@ 2016-05-31  8:22 Patrick Palka
  2016-05-31 10:32 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Palka @ 2016-05-31  8:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: Patrick Palka

The test case ssa-thread-14.c expects that non-short-circuit logical ops
are used so it fails on targets that don't use such ops by default.  To
fix, I copied the dg directives from tree-ssa/reassoc-35.c which look
reasonable.  Does this look OK to commit?

gcc/testsuite/ChangeLog:

	PR tree-optimization/71314
	* gcc.dg/tree-ssa/ssa-thread-14.c: Adjust target selector.  Pass
	-mbranch-cost= 2.
---
 gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
index e2ac2f7..c754b5b 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
@@ -1,5 +1,6 @@
-/* { dg-do compile }  */
+/* { dg-do compile { target { ! { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-* } } } }  */
 /* { dg-additional-options "-O2 -fdump-tree-vrp-details" }  */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } }  */
 /* { dg-final { scan-tree-dump-times "Threaded jump" 8 "vrp1" } }  */
 
 void foo (void);
-- 
2.9.0.rc0.29.gabd6606

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

* Re: [PATCH] Fix PR tree-optimization/71314
  2016-05-31  8:22 [PATCH] Fix PR tree-optimization/71314 Patrick Palka
@ 2016-05-31 10:32 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2016-05-31 10:32 UTC (permalink / raw)
  To: Patrick Palka; +Cc: GCC Patches

On Mon, May 30, 2016 at 9:50 PM, Patrick Palka <patrick@parcs.ath.cx> wrote:
> The test case ssa-thread-14.c expects that non-short-circuit logical ops
> are used so it fails on targets that don't use such ops by default.  To
> fix, I copied the dg directives from tree-ssa/reassoc-35.c which look
> reasonable.  Does this look OK to commit?

Yes.

Richard.

> gcc/testsuite/ChangeLog:
>
>         PR tree-optimization/71314
>         * gcc.dg/tree-ssa/ssa-thread-14.c: Adjust target selector.  Pass
>         -mbranch-cost= 2.
> ---
>  gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
> index e2ac2f7..c754b5b 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c
> @@ -1,5 +1,6 @@
> -/* { dg-do compile }  */
> +/* { dg-do compile { target { ! { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-* } } } }  */
>  /* { dg-additional-options "-O2 -fdump-tree-vrp-details" }  */
> +/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } }  */
>  /* { dg-final { scan-tree-dump-times "Threaded jump" 8 "vrp1" } }  */
>
>  void foo (void);
> --
> 2.9.0.rc0.29.gabd6606
>

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

end of thread, other threads:[~2016-05-31  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31  8:22 [PATCH] Fix PR tree-optimization/71314 Patrick Palka
2016-05-31 10:32 ` Richard Biener

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