+2018-11-20 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/88069
+ * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
+ virtual PHI arguments.
+
2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/88083
+2018-11-20 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/88069
+ * gcc.dg/pr88069.c: New testcase.
+
2018-11-20 Martin Liska <mliska@suse.cz>
PR ipa/88093
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-pre -ftree-vectorize -fno-tree-pta" } */
+
+void
+qf (void);
+
+void
+mr (short int db)
+{
+ int vq;
+ short int *lp = &db;
+
+ for (vq = 0; vq < 1; ++vq)
+ qf ();
+
+ while (*lp < 2)
+ {
+ *lp = db;
+ lp = (short int *) &vq;
+ ++*lp;
+ }
+}
+
value from the backedge as that confuses the alias-walking code.
See gcc.dg/torture/pr87176.c. If the value is the same on a
non-backedge everything is OK though. */
- if (backedge_val
- && !seen_non_backedge
- && TREE_CODE (backedge_val) == SSA_NAME
- && sameval == backedge_val
- && (SSA_NAME_IS_VIRTUAL_OPERAND (backedge_val)
- || SSA_VAL (backedge_val) != backedge_val))
+ bool visited_p;
+ if ((backedge_val
+ && !seen_non_backedge
+ && TREE_CODE (backedge_val) == SSA_NAME
+ && sameval == backedge_val
+ && (SSA_NAME_IS_VIRTUAL_OPERAND (backedge_val)
+ || SSA_VAL (backedge_val) != backedge_val))
+ /* Do not value-number a virtual operand to sth not visited though
+ given that allows us to escape a region in alias walking. */
+ || (sameval
+ && TREE_CODE (sameval) == SSA_NAME
+ && SSA_NAME_IS_VIRTUAL_OPERAND (sameval)
+ && (SSA_VAL (sameval, &visited_p), !visited_p)))
/* Note this just drops to VARYING without inserting the PHI into
the hashes. */
result = PHI_RESULT (phi);