+2019-07-31 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-07-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91200
+ * tree-ssa-phiopt.c (cond_store_replacement): Check we have
+ no PHI nodes in middle-bb.
+
+ 2019-07-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/91162
+ * tree-cfg.c (move_block_to_fn): When releasing a virtual PHI
+ node make sure to replace all uses with something valid.
+
+ 2019-07-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91145
+ * tree-vect-slp.c (vect_build_slp_tree_2): Fix reduction
+ chain check.
+
+ 2019-07-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/91131
+ * gimplify.c (gimplify_compound_literal_expr): Force a temporary
+ when the object is volatile and we have not cleared it even though
+ there are no nonzero elements.
+
+ 2019-07-10 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91126
+ * tree-ssa-sccvn.c (n_walk_cb_data::push_partial_def): Adjust
+ native encoding offset for BYTES_BIG_ENDIAN.
+ (vn_reference_lookup_3): Likewise.
+
2019-07-30 Jan Hubicka <jh@suse.cz>
Backport from mainline
one field to assign, initialize the target from a temporary. */
if (TREE_THIS_VOLATILE (object)
&& !TREE_ADDRESSABLE (type)
- && num_nonzero_elements > 0
+ && (num_nonzero_elements > 0 || !cleared)
&& vec_safe_length (elts) > 1)
{
tree temp = create_tmp_var (TYPE_MAIN_VARIANT (type));
+2019-07-31 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2019-07-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91200
+ * gcc.dg/torture/pr91200.c: New testcase.
+
+ 2019-07-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/91162
+ * gcc.dg/autopar/pr91162.c: New testcase.
+
+ 2019-07-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91145
+ * gcc.dg/torture/pr91145.c: New testcase.
+
+ 2019-07-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/91131
+ * gcc.target/i386/pr91131.c: New testcase.
+
+ 2019-07-10 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91126
+ * gcc.dg/torture/pr91126.c: New testcase.
+
2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91296
--- /dev/null
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O -ftree-parallelize-loops=2 -fno-tree-dominator-opts --param parloops-min-per-thread=30" } */
+
+void
+zf (__int128 ct)
+{
+ __int128 *rk = &ct;
+
+ if (0)
+ {
+ int jj;
+
+t9:
+ for (jj = 0; jj < 60; ++jj)
+ {
+ }
+
+ __builtin_unreachable ();
+ }
+
+ while (*rk < 1)
+ ++*rk;
+
+ goto t9;
+}
--- /dev/null
+/* { dg-do run } */
+
+struct S
+{
+ __INT32_TYPE__ a : 24;
+ __INT32_TYPE__ b : 8;
+} s;
+
+int
+main()
+{
+ s.a = 0xfefefe;
+ s.b = 0xfe;
+ unsigned char c;
+ c = ((unsigned char *)&s)[0];
+ if (c != 0xfe)
+ __builtin_abort ();
+ c = ((unsigned char *)&s)[1];
+ if (c != 0xfe)
+ __builtin_abort ();
+ c = ((unsigned char *)&s)[2];
+ if (c != 0xfe)
+ __builtin_abort ();
+ c = ((unsigned char *)&s)[3];
+ if (c != 0xfe)
+ __builtin_abort ();
+ return 0;
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-additional-options "-march=skylake-avx512" { target x86_64-*-* i?86-*-* } } */
+
+int a, c;
+unsigned b, e;
+extern unsigned d[100];
+
+void f()
+{
+ for (int g = 0; g < 70; g++)
+ {
+
+ b += d[g] - c;
+ e -= g ^ a;
+ }
+}
--- /dev/null
+/* { dg-do compile } */
+
+int printf (const char *, ...);
+
+char a;
+int b, c, **d;
+
+int main ()
+{
+ int f = -128, *g, *h[2] = {0, 0}, i;
+ printf("0");
+ if (a)
+ {
+ while (f > a) {
+ int *j = &i;
+ *j |= 0;
+ }
+ h[i] = &c;
+ }
+ if (h[1])
+ {
+ int **k = &g;
+ *k = &f;
+ while (i)
+ {
+ int **l[] = {&g};
+ }
+ int **m = &g;
+ *d = *m = &b;
+ }
+ return 0;
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+struct Reg_T {
+ unsigned int a : 3;
+ unsigned int b : 1;
+ unsigned int c : 4;
+};
+
+volatile struct Reg_T Reg_A;
+
+int
+main ()
+{
+ Reg_A = (struct Reg_T){ .a = 0, .b = 0, .c = 0 };
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "mov\[^\r\n\]*Reg_A" 1 } } */
if (virtual_operand_p (op))
{
/* Remove the phi nodes for virtual operands (alias analysis will be
- run for the new function, anyway). */
+ run for the new function, anyway). But replace all uses that
+ might be outside of the region we move. */
+ use_operand_p use_p;
+ imm_use_iterator iter;
+ gimple *use_stmt;
+ FOR_EACH_IMM_USE_STMT (use_stmt, iter, op)
+ FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
+ SET_USE (use_p, SSA_NAME_VAR (op));
remove_phi_node (&psi, true);
continue;
}
|| gimple_has_volatile_ops (assign))
return false;
+ /* And no PHI nodes so all uses in the single stmt are also
+ available where we insert to. */
+ if (!gimple_seq_empty_p (phi_nodes (middle_bb)))
+ return false;
+
locus = gimple_location (assign);
lhs = gimple_assign_lhs (assign);
rhs = gimple_assign_rhs1 (assign);
tree rhs = gimple_assign_rhs1 (def_stmt);
if (TREE_CODE (rhs) == SSA_NAME)
rhs = SSA_VAL (rhs);
- len = native_encode_expr (gimple_assign_rhs1 (def_stmt),
+ unsigned pad = 0;
+ if (BYTES_BIG_ENDIAN
+ && is_a <scalar_mode> (TYPE_MODE (TREE_TYPE (rhs))))
+ {
+ /* On big-endian the padding is at the 'front' so
+ just skip the initial bytes. */
+ fixed_size_mode mode
+ = as_a <fixed_size_mode> (TYPE_MODE (TREE_TYPE (rhs)));
+ pad = GET_MODE_SIZE (mode) - size2 / BITS_PER_UNIT;
+ }
+ len = native_encode_expr (rhs,
buffer, sizeof (buffer),
- (offseti - offset2) / BITS_PER_UNIT);
+ ((offseti - offset2) / BITS_PER_UNIT
+ + pad));
if (len > 0 && len * BITS_PER_UNIT >= maxsizei)
{
tree type = vr->type;
FOR_EACH_VEC_ELT (stmts, i, other_info)
{
/* But for reduction chains only check on the first stmt. */
- if (REDUC_GROUP_FIRST_ELEMENT (other_info)
+ if (!STMT_VINFO_DATA_REF (other_info)
+ && REDUC_GROUP_FIRST_ELEMENT (other_info)
&& REDUC_GROUP_FIRST_ELEMENT (other_info) != stmt_info)
continue;
if (STMT_VINFO_DEF_TYPE (other_info) != def_type)