From e26584b265dc2af4e95d23c4bdd89462ea508b69 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 1 Dec 2018 00:26:41 +0100 Subject: re PR testsuite/85368 (phi-opt-11 test fails on IBM Z) PR testsuite/85368 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param. * tree-ssa-ifcombine.c (ifcombine_ifandif): If --param logical-op-non-short-circuit is present, override LOGICAL_OP_NON_SHORT_CIRCUIT value from the param. * fold-const.c (fold_range_test, fold_truth_andor): Likewise. * lib/target-supports.exp (logical_op_short_circuit): Remove. * gcc.dg/builtin-bswap-7.c: Remove logical_op_short_circuit effective target, drop -mbranch-cost= options from the test and instead pass --param logical-op-non-short-circuit=0 or --param logical-op-non-short-circuit=1 depending on what the tests meant to test. * gcc.dg/pr21643.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c: Likewise. * gcc.dg/tree-ssa/phi-opt-11.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-thread-14.c: Likewise. * gcc.dg/tree-ssa/vrp47.c: Likewise. * gcc.dg/tree-ssa/ssa-dom-thread-11.c: Likewise. * gcc.dg/tree-ssa/ssa-dom-thread-16.c: Likewise. * gcc.dg/tree-ssa/ssa-dom-thread-14.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c: Likewise. * gcc.dg/tree-ssa/vrp87.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c: Likewise. * gcc.dg/tree-ssa/phi-opt-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-13.c: Likewise. * gcc.dg/tree-ssa/ssa-thread-11.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c: Likewise. * gcc.dg/tree-ssa/forwprop-28.c: Likewise. * gcc.dg/binop-xor1.c: Likewise. * gcc.dg/pr46309.c: Likewise. * gcc.dg/tree-ssa/ssa-dom-thread-18.c: New test. * gcc.dg/tree-ssa/reassoc-32.c: Add --param logical-op-non-short-circuit=1 to dg-options. * gcc.dg/tree-ssa/reassoc-33.c: Likewise. * gcc.dg/tree-ssa/reassoc-34.c: Likewise. * gcc.dg/tree-ssa/reassoc-35.c: Likewise. * gcc.dg/tree-ssa/reassoc-36.c: Likewise. From-SVN: r266700 --- gcc/tree-ssa-ifcombine.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/tree-ssa-ifcombine.c') diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c index 2b96937..ddb9564 100644 --- a/gcc/tree-ssa-ifcombine.c +++ b/gcc/tree-ssa-ifcombine.c @@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see #include "gimplify-me.h" #include "tree-cfg.h" #include "tree-ssa.h" +#include "params.h" #ifndef LOGICAL_OP_NON_SHORT_CIRCUIT #define LOGICAL_OP_NON_SHORT_CIRCUIT \ @@ -563,7 +564,11 @@ ifcombine_ifandif (basic_block inner_cond_bb, bool inner_inv, { tree t1, t2; gimple_stmt_iterator gsi; - if (!LOGICAL_OP_NON_SHORT_CIRCUIT || flag_sanitize_coverage) + bool logical_op_non_short_circuit = LOGICAL_OP_NON_SHORT_CIRCUIT; + if (PARAM_VALUE (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT) != -1) + logical_op_non_short_circuit + = PARAM_VALUE (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT); + if (!logical_op_non_short_circuit || flag_sanitize_coverage) return false; /* Only do this optimization if the inner bb contains only the conditional. */ if (!gsi_one_before_end_p (gsi_start_nondebug_after_labels_bb (inner_cond_bb))) -- cgit v1.1