+2018-11-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-06-14 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/86139
+ * tree-vect-generic.c (build_word_mode_vector_type): Remove
+ duplicate and harmful type_hash_canon.
+
+ 2018-06-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/86076
+ * tree-cfg.c (move_stmt_op): unshare invariant addresses
+ before adjusting their block.
+
2018-11-22 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline
+2018-11-26 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-06-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/86076
+ * gcc.dg/pr86076.c: New testcase.
+
2018-11-26 Matthias Klose <doko@ubuntu.com>
* jit.dg/test-long-names.c: Fix build with -Wformat-security.
--- /dev/null
+/* { dg-do compile { target pthread } } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fno-tree-dce -fno-tree-pre -fno-tree-vrp --param max-loop-header-insns=1" } */
+
+int __attribute__ ((noinline))
+lv (int tm)
+{
+ (void) tm;
+
+ return 0;
+}
+
+void
+o7 (int uu)
+{
+ while (uu < 1)
+ while (uu != 0)
+ {
+ short int ca;
+
+ ca = lv (0);
+ (void) ca;
+ ++uu;
+ }
+
+ lv (lv (0));
+}
;
else if (block == p->orig_block
|| p->orig_block == NULL_TREE)
- TREE_SET_BLOCK (t, p->new_block);
+ {
+ /* tree_node_can_be_shared says we can share invariant
+ addresses but unshare_expr copies them anyways. Make sure
+ to unshare before adjusting the block in place - we do not
+ always see a copy here. */
+ if (TREE_CODE (t) == ADDR_EXPR
+ && is_gimple_min_invariant (t))
+ *tp = t = unshare_expr (t);
+ TREE_SET_BLOCK (t, p->new_block);
+ }
else if (flag_checking)
{
while (block && TREE_CODE (block) == BLOCK && block != p->orig_block)
return vector_last_type;
}
- /* We build a new type, but we canonicalize it nevertheless,
- because it still saves some memory. */
vector_last_nunits = nunits;
- vector_last_type = type_hash_canon (nunits,
- build_vector_type (vector_inner_type,
- nunits));
+ vector_last_type = build_vector_type (vector_inner_type, nunits);
return vector_last_type;
}