2017-01-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/79186
* tree-vrp.c (register_new_assert_for): Make sure we've seen
both incoming edges before moving an assert.
* gcc.dg/torture/pr79186.c: New testcase.
* gcc.dg/torture/pr79187.c: Likewise.
From-SVN: r244804
+2017-01-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79186
+ * tree-vrp.c (register_new_assert_for): Make sure we've seen
+ both incoming edges before moving an assert.
+
2017-01-23 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (load_from_param_1): Removed.
+2017-01-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79186
+ * gcc.dg/torture/pr79186.c: New testcase.
+ * gcc.dg/torture/pr79187.c: Likewise.
+
2017-01-23 Martin Jambor <mjambor@suse.cz>
* gcc.dg/ipa/vrp8.c: New test.
--- /dev/null
+/* { dg-do run } */
+
+int a, b;
+unsigned char c, d, e;
+
+int main ()
+{
+ if (b || !a)
+ {
+ c = a;
+ if (!c && !a)
+ d = 0;
+ e = -a;
+ }
+ return 0;
+}
--- /dev/null
+/* { dg-do run } */
+
+int printf (const char *, ...);
+
+int a, b = -600, c, d[] = { 0 }, e, f, g = -1, h;
+unsigned i = ~0;
+
+int main ()
+{
+ for (; h < 2; h++)
+ {
+ if (a > 0)
+ printf ("%d\n", d[b]);
+ f = ~(b % i);
+ c = g | (f && g) && e | b;
+ a = ~(~g & b);
+ }
+ return 0;
+}
/* If we have the same assertion on all incoming edges of a BB
instead insert it at the beginning of it. */
if (e && loc->e
+ && e != loc->e
&& dest_bb == loc->e->dest
&& EDGE_COUNT (dest_bb->preds) == 2)
{