+2019-08-30 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-05-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/90637
+ * tree-ssa-sink.c (statement_sink_location): Honor the
+ computed sink location for single-uses.
+
+ * gcc.dg/gomp/pr90637.c: New testcase.
+
+ 2019-06-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/90930
+ * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Set visited
+ flag on new stmts to avoid re-processing them.
+
+ 2019-04-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/90194
+ * match.pd: Add pattern to simplify view-conversion of an
+ empty constructor.
+
+ 2019-04-24 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/90213
+ * gimple-fold.c (fold_const_aggregate_ref_1): Do multiplication
+ by size and BITS_PER_UNIT on poly-wide-ints.
+
+ 2019-04-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/90071
+ * tree-ssa-reassoc.c (init_range_entry): Do not pick up
+ abnormal operands from def stmts.
+
+ 2019-03-13 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/89677
+ * tree-scalar-evolution.c (simplify_peeled_chrec): Do not
+ throw FP expressions at tree-affine.
+
2019-08-30 Segher Boessenkool <segher@kernel.crashing.org>
Backport from trunk
+2019-08-30 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-05-15 Richard Biener <rguenther@suse.de>
+
+ PR c/90474
+ * c-common.c (c_common_mark_addressable_vec): Also mark
+ a COMPOUND_LITERAL_EXPR_DECL addressable similar to
+ c_mark_addressable.
+
2019-08-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
return;
if (!VAR_P (t) || !DECL_HARD_REGISTER (t))
TREE_ADDRESSABLE (t) = 1;
+ if (TREE_CODE (t) == COMPOUND_LITERAL_EXPR)
+ TREE_ADDRESSABLE (COMPOUND_LITERAL_EXPR_DECL (t)) = 1;
}
= wi::sext (wi::to_offset (idx) - wi::to_offset (low_bound),
TYPE_PRECISION (TREE_TYPE (idx)));
+ woffset *= tree_to_uhwi (unit_size);
+ woffset *= BITS_PER_UNIT;
if (wi::fits_shwi_p (woffset))
{
offset = woffset.to_shwi ();
- /* TODO: This code seems wrong, multiply then check
- to see if it fits. */
- offset *= tree_to_uhwi (unit_size);
- offset *= BITS_PER_UNIT;
-
base = TREE_OPERAND (t, 0);
ctor = get_base_constructor (base, &offset, valueize);
/* Empty constructor. Always fold to 0. */
&& (TYPE_SIZE (TREE_TYPE (@0)) == TYPE_SIZE (TREE_TYPE (@1))))
(view_convert @1)))
+/* Simplify a view-converted empty constructor. */
+(simplify
+ (view_convert CONSTRUCTOR@0)
+ (if (TREE_CODE (@0) != SSA_NAME
+ && CONSTRUCTOR_NELTS (@0) == 0)
+ { build_zero_cst (type); }))
+
/* Re-association barriers around constants and other re-association
barriers can be removed. */
(simplify
+2019-08-30 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-04-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/90194
+ * g++.dg/torture/pr90194.C: New testcase.
+
+ 2019-04-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/90071
+ * gcc.dg/torture/pr90071.c: New testcase.
+
+ 2019-03-13 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/89677
+ * gcc.dg/torture/pr89677.c: New testcase.
+
2019-08-30 Segher Boessenkool <segher@kernel.crashing.org>
Backport from trunk
--- /dev/null
+// { dg-do compile }
+// { dg-additional-options "-g" }
+
+struct cb {
+ int yr;
+};
+
+void *
+operator new (__SIZE_TYPE__, void *nq)
+{
+ return nq;
+}
+
+void
+af (int xn)
+{
+ new (&xn) cb { };
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
+
+int a, b, d;
+unsigned c;
+float e, f, g;
+void h() {
+ float *i = &g;
+ for (; c < 10; c += 3)
+ for (; d; d += 3) {
+ a = *i;
+ g = f + 0;
+ f = b + *i + (b - e + 305219) + -b + 3;
+ }
+}
--- /dev/null
+/* { dg-do compile } */
+
+int a;
+static int b;
+
+void
+foo ()
+{
+ int d;
+ int e = (int) (__INTPTR_TYPE__) &&f;
+ void *g = &&h;
+h: ++e;
+ if (a)
+ i: goto *g;
+ for (;;)
+ {
+ e = 0;
+ if (b)
+ goto i;
+ }
+f:
+ goto *({ d || e < 0 || e >= 2; });
+ &e;
+}
return build_polynomial_chrec (loop->num, init_cond, right);
}
+ /* The affine code only deals with pointer and integer types. */
+ if (!POINTER_TYPE_P (type)
+ && !INTEGRAL_TYPE_P (type))
+ return chrec_dont_know;
+
/* Try harder to check if they are equal. */
tree_to_aff_combination_expand (left, type, &aff1, &peeled_chrec_map);
tree_to_aff_combination_expand (step_val, type, &aff2, &peeled_chrec_map);
exp_type = boolean_type_node;
}
- if (TREE_CODE (arg0) != SSA_NAME)
+ if (TREE_CODE (arg0) != SSA_NAME
+ || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (arg0))
break;
loc = gimple_location (stmt);
switch (code)
else
{
stmts[i] = build_and_add_sum (TREE_TYPE (last_rhs1), op1, op2, opcode);
+ gimple_set_visited (stmts[i], true);
}
if (dump_file && (dump_flags & TDF_DETAILS))
{
if (sinkbb == frombb)
return false;
- *togsi = gsi_for_stmt (use);
+ if (sinkbb == gimple_bb (use))
+ *togsi = gsi_for_stmt (use);
+ else
+ *togsi = gsi_after_labels (sinkbb);
return true;
}