2018-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/87700
* tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
* gcc.dg/torture/pr87700.c: New testcase.
From-SVN: r265418
+2018-10-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87700
+ * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
+
2018-10-23 Jakub Jelinek <jakub@redhat.com>
PR target/87674
+2018-10-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87700
+ * gcc.dg/torture/pr87700.c: New testcase.
+
2018-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/87693
--- /dev/null
+/* { dg-do compile } */
+
+void
+wn (int ki)
+{
+ int m8 = 0;
+ int *d6 = &ki;
+
+ if (ki == 0)
+ {
+ud:
+ for (ki = 0; ki < 1; ++ki)
+ for (m8 = 0; m8 < 1; ++m8)
+ goto ud;
+
+ d6 = &m8;
+
+y8:
+ ++m8;
+
+xw:
+ if (ki == 0)
+ {
+ }
+ else
+ {
+ for (m8 = 0; m8 < 1; ++m8)
+ {
+gt:
+ if (*d6 == 0)
+ goto y8;
+ }
+
+ for (m8 = 0; m8 < 1; ++m8)
+ {
+ goto gt;
+
+ym:
+ ;
+ }
+ }
+
+ d6 = &ki;
+
+ goto ym;
+ }
+
+ goto xw;
+}
copy_of[ver].value = val;
if (old != val
- || (val && !operand_equal_p (old, val, 0)))
+ && (!old || !operand_equal_p (old, val, 0)))
return true;
return false;