From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B0DB8385E032; Thu, 2 Apr 2020 07:39:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0DB8385E032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585813199; bh=xvWJdX36LND9eLwC6tDRgng7s77pY7ai7F16V4qma18=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HKN2eYeNRCnhxtL/rlareMRzVPF/NnRWXgPSR5UeenUO79Lhg9newBuj3i/ZcLi9Q ZLKJHtSYy3oynW4GRtXTjMRpBuR8ay9RgkrSMxHz+dx72GZFp0aHWpYLUxlt/O5Fp/ RlhVeldmnku8TYofTlBwnWVHUKxUmy/JaGNHzEYM= From: "rguenther at suse dot de" 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 07:39:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: linkw at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 07:39:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94443 --- Comment #6 from rguenther at suse dot de --- On Thu, 2 Apr 2020, linkw at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94443 >=20 > --- Comment #4 from Kewen Lin --- > 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 p= atch > makes it work. It also polishes copy related code a bit although not real= ly > necessary to make this case pass. >=20 > 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_inf= o, > if (stmts) > { > gimple_stmt_iterator exit_gsi =3D gsi_after_labels (exit_bb); > - gsi_insert_before (&exit_gsi, stmts, GSI_CONTINUE_LINKING); > + gsi_insert_seq_before (&exit_gsi, stmts, GSI_SAME_STMT); >=20 > /* Remove existing phi from lhs and create one copy from new_tree.= */ > tree lhs_phi =3D NULL_TREE; > @@ -8060,10 +8060,10 @@ vectorizable_live_operation (stmt_vec_info stmt_i= nfo, > gimple *phi =3D gsi_stmt (gsi); > if ((gimple_phi_arg_def (phi, 0) =3D=3D lhs)) > { > - remove_phi_node (&gsi, false); > lhs_phi =3D gimple_phi_result (phi); > gimple *copy =3D 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); this should also use gsi_insert_before, otherwise if the first stmt after labels has a use of lhs_phi then SSA will be corrupt. > + remove_phi_node (&gsi, false); I prefer to have the PHI removed before you re-use its LHS. OK with those changes. > break; > } > } >=20 >=