+2018-02-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/84204
+ * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
+ this place.
+
+ PR tree-optimization/84205
+ * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
+ special-case isl_ast_op_zdiv_r.
+
+ PR tree-optimization/84223
+ * graphite-scop-detection.c (gather_bbs::before_dom_children):
+ Only add conditions from within the region.
+ (gather_bbs::after_dom_children): Adjust.
+
2018-02-07 Georg-Johann Lay <avr@gjlay.de>
PR target/84209
we cannot represent explicitely but that are no-ops for TYPE.
Elide those. */
if ((expr_type == isl_ast_op_pdiv_r
+ || expr_type == isl_ast_op_zdiv_r
|| expr_type == isl_ast_op_add)
&& isl_ast_expr_get_type (arg_expr) == isl_ast_expr_int
&& (wi::exact_log2 (widest_int_from_isl_expr_int (arg_expr))
}
}
- gcond *stmt = single_pred_cond_non_loop_exit (bb);
-
- if (stmt)
+ if (gcond *stmt = single_pred_cond_non_loop_exit (bb))
{
edge e = single_pred_edge (bb);
-
- conditions.safe_push (stmt);
-
- if (e->flags & EDGE_TRUE_VALUE)
- cases.safe_push (stmt);
- else
- cases.safe_push (NULL);
+ /* Make sure the condition is in the region and thus was verified
+ to be handled. */
+ if (e != region->region.entry)
+ {
+ conditions.safe_push (stmt);
+ if (e->flags & EDGE_TRUE_VALUE)
+ cases.safe_push (stmt);
+ else
+ cases.safe_push (NULL);
+ }
}
scop->scop_info->bbs.safe_push (bb);
if (single_pred_cond_non_loop_exit (bb))
{
- conditions.pop ();
- cases.pop ();
+ edge e = single_pred_edge (bb);
+ if (e != scop->scop_info->region.entry)
+ {
+ conditions.pop ();
+ cases.pop ();
+ }
}
}
+2018-02-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/84204
+ * gcc.dg/graphite/pr84204.c: New testcase.
+
+ PR tree-optimization/84205
+ * gcc.dg/graphite/pr84205.c: New testcase.
+
+ PR tree-optimization/84223
+ * gfortran.dg/graphite/pr84223.f90: New testcase.
+
2018-02-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71662
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -floop-parallelize-all -fno-tree-loop-im --param scev-max-expr-size=3" } */
+
+int oc;
+
+void
+mo (int xd)
+{
+ while (xd < 1)
+ {
+ for (oc = 0; oc < 2; ++oc)
+ {
+ }
+
+ ++xd;
+ }
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -floop-nest-optimize -ftree-pre -fno-tree-loop-im" } */
+
+long long unsigned int od;
+int zj, fk, ea;
+
+void
+ke (void)
+{
+ if (od != 0 && zj != 0)
+ {
+ for (fk = 0; fk < 2; ++fk)
+ {
+ }
+
+ if (od == (long long unsigned int) zj)
+ zj = 0;
+
+ for (ea = 0; ea < 2; ++ea)
+ {
+ }
+ }
+}
--- /dev/null
+! { dg-do compile }
+! { dg-options "-fgraphite-identity -O1 --param sccvn-max-alias-queries-per-access=0" }
+ include "../assumed_rank_bounds_2.f90"
default:
{
- int size = 0;
- if ((tree_contains_chrecs (op0, &size)
- || tree_contains_chrecs (op1, &size))
- && size < PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
+ if (tree_contains_chrecs (op0, NULL)
+ || tree_contains_chrecs (op1, NULL))
return build2 (code, type, op0, op1);
- else if (size < PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
+ else
{
if (code == POINTER_PLUS_EXPR)
return fold_build_pointer_plus (fold_convert (type, op0),
fold_convert (type, op0),
fold_convert (type, op1));
}
- else
- return chrec_dont_know;
}
}
}