+2018-09-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87177
+ * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
+ cleanup.
+
2018-09-03 Alexander Monakov <amonakov@ispras.ru>
* bb-reorder.c (edge_order): Convert to C-qsort-style
+2018-09-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87177
+ * gcc.dg/torture/pr87177.c: New testcase.
+ * gcc.dg/torture/pr87177-2.c: Likewise.
+
2018-09-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/87200
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+int dk;
+
+void
+lv (void)
+{
+ int nm;
+
+ dk = 1;
+ while (dk != 0)
+ {
+ }
+
+ if (1 / 0)
+ {
+ dk = 0;
+ while (dk != 0)
+ {
+ }
+ }
+
+ for (;;)
+ nm = !!dk;
+
+ (void) nm;
+}
--- /dev/null
+/* { dg-do run } */
+
+int __attribute__((noinline)) my_printf (const char *p, ...)
+{
+ static volatile int x;
+ ++x;
+}
+
+int a, b, c, e, f, g, h, i, j, k, l;
+unsigned d;
+
+static void p ()
+{
+ while (1)
+ {
+ int n = h;
+ h = 8;
+ if (!e)
+ break;
+ h = n;
+ while (1)
+ ;
+ }
+ for (; c != 4; c++)
+ {
+ int o = g = 1;
+ for (; g; g--)
+ {
+ while (d < b)
+ e--;
+ a = g;
+ int q = o;
+ if (q)
+ L1:
+ j = f;
+ if (l)
+ {
+ my_printf ("%d", g);
+ goto L1;
+ }
+ o = l;
+ k = q;
+ }
+ }
+}
+
+void s ()
+{
+ int m = 0;
+L2:
+ if (i && g)
+ goto L2;
+ for (; m < 2; m++)
+ p ();
+}
+
+int main ()
+{
+ s ();
+ return 0;
+}
do
{
- if (SSA_NAME_IS_DEFAULT_DEF (x))
- return x;
- vn_ssa_aux_t tem
- = vn_ssa_aux_hash->find_with_hash (x, SSA_NAME_VERSION (x));
- /* For region-based VN this makes walk_non_aliased_vuses stop walking
- when we are about to look at a def outside of the region. */
- if (!tem || !tem->visited)
- return NULL_TREE;
- gcc_assert (tem->valnum != VN_TOP);
- x = tem->valnum;
+ x = SSA_VAL (x);
+ gcc_assert (x != VN_TOP);
}
while (SSA_NAME_IN_FREE_LIST (x));