Hi, The ssa-thread-14.c test has been failing for MIPS for a while.
According to Patrick Palka, who modified this test's target selector in the fix for PR71314, this test fails on targets which don't use non-short-circuit logical ops and should be skipped for such targets. In the case of MIPS, LOGICAL_OP_NON_SHORT_CIRCUIT is set to 0, so the test should be skipped for MIPS targets. This patch adds the !logical_op_short_circuit requirement (defined in testsuite/lib/target-supports.exp:7965) to ssa-thread-14.c's dg-options, which will exclude MIPS targets. It also removes the "-mbranch-cost" options from being passed to targets which will be skipped because of the newly added !logical_op_short_circuit requirement. This makes ssa-thread-14.c's target selector more similar the one from ssa-thread-11.c (which was mentioned as a solution to PR71314 in the Bugzilla thread). Here are some links, for your convenience: PR71314 on Bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71314 The patch submission for fixing PR71314: https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02359.html Does this look OK ? Is the !logical_op_short_circuit too heavy-handed here ? Regards, Toma Tabacu gcc/testsuite/ * gcc.dg/tree-ssa/ssa-thread-14.c (dg-options): Use logical_op_short_circuit to skip targets. (dg-additional-options): Don't pass -mbranch-cost=2 for MIPS, AVR and s390. 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 c754b5b..aa1323a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-14.c @@ -1,6 +1,6 @@ -/* { dg-do compile { target { ! { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-* } } } } */ +/* { dg-do compile { target { ! { logical_op_short_circuit || { 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-additional-options "-mbranch-cost=2" { target i?86-*-* x86_64-*-* } } */ /* { dg-final { scan-tree-dump-times "Threaded jump" 8 "vrp1" } } */ void foo (void);