Re: [PATCH] Fix PR tree-optimization/71314

2016-05-31 Thread Richard Biener
On Mon, May 30, 2016 at 9:50 PM, Patrick Palka  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
>


[PATCH] Fix PR tree-optimization/71314

2016-05-30 Thread 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