2020-05-25 Richard Biener <rguenther@suse.de>
+ PR tree-optimization/95295
+ * tree-ssa-loop-im.c (sm_seq_valid_bb): Compare remat stores
+ RHSes and drop to full sm_other if they are not equal.
+
+2020-05-25 Richard Biener <rguenther@suse.de>
+
PR tree-optimization/95271
* tree-vect-stmts.c (vectorizable_bswap): Update invariant SLP
children vector type.
2020-05-25 Richard Biener <rguenther@suse.de>
+ PR tree-optimization/95295
+ * gcc.dg/torture/pr95295-1.c: New testcase.
+ * gcc.dg/torture/pr95295-2.c: Likewise.
+ * gcc.dg/torture/pr95283.c: Likewise.
+
+2020-05-25 Richard Biener <rguenther@suse.de>
+
PR tree-optimization/95271
* gcc.dg/vect/bb-slp-pr95271.c: New testcase.
--- /dev/null
+/* { dg-do compile } */
+
+short c;
+_Bool d;
+unsigned e, f;
+char g, h;
+extern _Bool i[];
+void j()
+{
+ for (char a = 0; a < 100; a++)
+ for (char b = 0; b < 20; b += 2)
+ {
+ if (e)
+ d = f = 0;
+ else
+ g = i[8] = 0;
+ h = c;
+ }
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-additional-sources "pr95295-2.c" } */
+
+extern int var_4, a;
+extern unsigned var_9;
+extern short arr_272[];
+void test()
+{
+ for (int b = 0; b < 9; b++)
+ for (int c = 0; c < 9; c += 4)
+ {
+ arr_272[c] = var_9 ? var_4 : 0;
+ a = 0;
+ }
+}
--- /dev/null
+/* { dg-do compile } */
+
+int a;
+int var_4 = 1;
+unsigned var_9 = 8;
+short arr_272[20];
+void test();
+int main()
+{
+ test();
+ if (arr_272[4] != 1)
+ __builtin_abort ();
+ return 0;
+}
if (edge_seq[i].second == sm_ord)
bitmap_set_bit (refs_not_supported, edge_seq[i].first);
first_edge_seq[i].second = sm_other;
+ first_edge_seq[i].from = NULL_TREE;
}
/* sm_other prevails. */
else if (first_edge_seq[i].second != edge_seq[i].second)
gcc_assert (bitmap_bit_p (refs_not_supported,
first_edge_seq[i].first));
first_edge_seq[i].second = sm_other;
+ first_edge_seq[i].from = NULL_TREE;
}
+ else if (first_edge_seq[i].second == sm_other
+ && first_edge_seq[i].from != NULL_TREE
+ && (edge_seq[i].from == NULL_TREE
+ || !operand_equal_p (first_edge_seq[i].from,
+ edge_seq[i].from, 0)))
+ first_edge_seq[i].from = NULL_TREE;
}
/* Any excess elements become sm_other since they are now
coonditionally executed. */