2019-07-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/91267
* vr-values.c (vr_values::update_value_range): Add early return
for effectively VARYING lattice entry.
* gcc.dg/torture/pr91267.c: New testcase.
From-SVN: r273874
+2019-07-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91267
+ * vr-values.c (vr_values::update_value_range): Add early return
+ for effectively VARYING lattice entry.
+
2019-07-29 Richard Sandiford <richard.sandiford@arm.com>
PR debug/86638
+2019-07-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91267
+ * gcc.dg/torture/pr91267.c: New testcase.
+
2019-07-29 Richard Sandiford <richard.sandiford@arm.com>
* c-c++-common/guality/Og-dce-1.c: New test.
--- /dev/null
+/* { dg-do compile } */
+
+void bar (void);
+void baz (int);
+char *qux (void);
+int a, b;
+
+void
+foo (int f, char *d)
+{
+ char *e;
+ while (d)
+ {
+ if (f)
+ if (e)
+ bar ();
+ baz (e - (d + a));
+ b = e - d;
+ d = qux ();
+ }
+}
new_vr->intersect (&nr);
}
- /* Update the value range, if necessary. */
+ /* Update the value range, if necessary. If we cannot allocate a lattice
+ entry for VAR keep it at VARYING. This happens when DOM feeds us stmts
+ with SSA names allocated after setting up the lattice. */
old_vr = get_lattice_entry (var);
+ if (!old_vr)
+ return false;
is_new = !old_vr->equal_p (*new_vr, /*ignore_equivs=*/false);
if (is_new)