https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67239

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
Does this patch

diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 2ac3828..8b57875 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -4372,17 +4372,16 @@ sccvn_dom_walker::before_dom_children (basic_block bb)
        {
          gimple *stmt = last_stmt (e->src);
          if (stmt
-             && gimple_code (stmt) == GIMPLE_COND)
+             && gimple_code (stmt) == GIMPLE_COND
+             && (e->flags & EDGE_TRUE_VALUE) != 0)
            {
              enum tree_code code = gimple_cond_code (stmt);
              tree lhs = gimple_cond_lhs (stmt);
              tree rhs = gimple_cond_rhs (stmt);
-             record_conds (bb, code, lhs, rhs,
-                           (e->flags & EDGE_TRUE_VALUE) != 0);
+             record_conds (bb, code, lhs, rhs, true);
              code = invert_tree_comparison (code, HONOR_NANS (lhs));
              if (code != ERROR_MARK)
-               record_conds (bb, code, lhs, rhs,
-                             (e->flags & EDGE_TRUE_VALUE) == 0);
+               record_conds (bb, code, lhs, rhs, false);
            }
        }
     }

make any senses? Do we need to check EDGE_FALSE_VALUE?

Reply via email to