Hi,

S/390 does not not define LOGICAL_OP_NON_SHORT_CIRCUIT but its default
value depends on the branch cost.  On S/390 we set a branch cost of 1
which makes us a logical_op_short_circuit target.

This "fixes" the following testcases:

< FAIL: gcc.dg/binop-xor1.c scan-tree-dump-times optimized "\\\\^" 1
< FAIL: gcc.dg/tree-ssa/forwprop-28.c scan-tree-dump-times forwprop1 "Replaced" 
8
< FAIL: gcc.dg/tree-ssa/vrp87.c scan-tree-dump vrp2 "Folded into: if.*"
< FAIL: gcc.dg/tree-ssa/vrp87.c scan-tree-dump cddce2 "Deleting.*_Bool.*;"

Bye,

-Andreas-

2014-03-28  Andreas Krebbel  <andreas.kreb...@de.ibm.com>

        * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Remove s390 special
          option.
        * lib/target-supports.exp: Return true for s390
          in check_effective_logical_op_short_circuit.

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c 
b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
index 1e46634..cafdf13 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
@@ -1,6 +1,5 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -fdump-tree-dom1-details" } */
-/* { dg-additional-options "-mbranch-cost=2" { target s390*-*-* } } */
 struct bitmap_head_def;
 typedef struct bitmap_head_def *bitmap;
 typedef const struct bitmap_head_def *const_bitmap;
diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index bee8471..0d2ccd5 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5712,6 +5712,7 @@ proc check_effective_target_logical_op_short_circuit {} {
         || [istarget arc*-*-*]
         || [istarget avr*-*-*]
         || [istarget crisv32-*-*] || [istarget cris-*-*]
+        || [istarget s390*-*-*]
         || [check_effective_target_arm_cortex_m] } {
        return 1
     }

Reply via email to