This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/80453] another compare-debug failure
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 20 Apr 2017 09:12:26 +0000
- Subject: [Bug debug/80453] another compare-debug failure
- Auto-submitted: auto-generated
- References: <bug-80453-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80453
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is that vn_phi_eq depends on cond_stmts_equal_p which may change
if we value-number the controlling condition after the PHI itself which can
trivially happen with SCC based value-numbering as controlling conditions are
not part of the SCC.
Index: gcc/tree-ssa-sccvn.c
===================================================================
--- gcc/tree-ssa-sccvn.c (revision 246964)
+++ gcc/tree-ssa-sccvn.c (working copy)
@@ -2941,10 +2941,12 @@ cond_stmts_equal_p (gcond *cond1, gcond
else
return false;
+#if 0
lhs1 = vn_valueize (lhs1);
rhs1 = vn_valueize (rhs1);
lhs2 = vn_valueize (lhs2);
rhs2 = vn_valueize (rhs2);
+#endif
return ((expressions_equal_p (lhs1, lhs2)
&& expressions_equal_p (rhs1, rhs2))
|| (commutative_tree_code (code1)
would fix this (and pessimize PHI VN of course).