public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/94443] [10 Regression] 510.parest_r and 526.blender_r ICE: verify_ssa failed since r10-7491-gbd0f22a8d5caea8905f38ff1fafce31c1b7d33ad
Date: Thu, 02 Apr 2020 00:42:01 +0000	[thread overview]
Message-ID: <bug-94443-4-DJFyld9CyV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94443-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> ---
This case has one conversion insn generated after bit_field_ref, the patch
introduces one stupid mistake to use gsi_insert_before instead of
gsi_insert_seq_before, it leads to miss the conversion insn.  The below patch
makes it work. It also polishes copy related code a bit although not really
necessary to make this case pass.

diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index c9b6534..4c2c9f7 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -8050,7 +8050,7 @@ vectorizable_live_operation (stmt_vec_info stmt_info,
   if (stmts)
     {
       gimple_stmt_iterator exit_gsi = gsi_after_labels (exit_bb);
-      gsi_insert_before (&exit_gsi, stmts, GSI_CONTINUE_LINKING);
+      gsi_insert_seq_before (&exit_gsi, stmts, GSI_SAME_STMT);

       /* Remove existing phi from lhs and create one copy from new_tree.  */
       tree lhs_phi = NULL_TREE;
@@ -8060,10 +8060,10 @@ vectorizable_live_operation (stmt_vec_info stmt_info,
          gimple *phi = gsi_stmt (gsi);
          if ((gimple_phi_arg_def (phi, 0) == lhs))
            {
-             remove_phi_node (&gsi, false);
              lhs_phi = gimple_phi_result (phi);
              gimple *copy = gimple_build_assign (lhs_phi, new_tree);
-             gsi_insert_after (&exit_gsi, copy, GSI_CONTINUE_LINKING);
+             gsi_insert_after (&exit_gsi, copy, GSI_NEW_STMT);
+             remove_phi_node (&gsi, false);
              break;
            }
        }

  parent reply	other threads:[~2020-04-02  0:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 14:27 [Bug tree-optimization/94443] New: " marxin at gcc dot gnu.org
2020-04-01 14:27 ` [Bug tree-optimization/94443] " marxin at gcc dot gnu.org
2020-04-01 14:39 ` marxin at gcc dot gnu.org
2020-04-01 14:41 ` marxin at gcc dot gnu.org
2020-04-01 15:22 ` linkw at gcc dot gnu.org
2020-04-02  0:42 ` linkw at gcc dot gnu.org [this message]
2020-04-02  2:38 ` linkw at gcc dot gnu.org
2020-04-02  7:39 ` rguenther at suse dot de
2020-04-02  7:42 ` linkw at gcc dot gnu.org
2020-04-02  7:48 ` linkw at gcc dot gnu.org
2020-04-02  9:25 ` marxin at gcc dot gnu.org
2020-04-02 13:23 ` linkw at gcc dot gnu.org
2020-04-02 13:42 ` raj.khem at gmail dot com
2020-04-02 13:44 ` raj.khem at gmail dot com
2020-04-02 14:31 ` linkw at gcc dot gnu.org
2020-04-03  8:09 ` cvs-commit at gcc dot gnu.org
2020-04-03 11:36 ` linkw at gcc dot gnu.org
2020-04-03 11:45 ` marxin at gcc dot gnu.org
2020-04-03 11:50 ` linkw at gcc dot gnu.org
2020-04-03 16:10 ` florin.iucha at amd dot com
2020-04-09 14:30 ` dpochepk at gmail dot com
2020-04-17  8:55 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94443-4-DJFyld9CyV@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).