+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
+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
--- /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;
+ }
+}
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. */