From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C94573850428; Wed, 24 Mar 2021 10:42:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C94573850428 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99746] [11 Regression] ICE in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450 Date: Wed, 24 Mar 2021 10:42:47 +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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: tnfchris at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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: Wed, 24 Mar 2021 10:42:47 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99746 --- Comment #12 from Richard Biener --- Btw, the following also works as a fix but obviously I'm not in a position = to fully evaluate this. That said, hybrid SLP detection was rewritten during SLP pattern development so the requirement to hook things up as regular pattern might no longer be there. Tamar - can you fully test this on aarch64? I see the testcase from this PR being hybrid vectorized appropriately then. diff --git a/gcc/tree-vect-slp-patterns.c b/gcc/tree-vect-slp-patterns.c index 85f2d03754d..cdd61e9a5cf 100644 --- a/gcc/tree-vect-slp-patterns.c +++ b/gcc/tree-vect-slp-patterns.c @@ -571,14 +571,8 @@ complex_pattern::build (vec_info *vinfo) STMT_VINFO_RELEVANT (call_stmt_info) =3D vect_used_in_scope; STMT_SLP_TYPE (call_stmt_info) =3D pure_slp; - /* add_pattern_stmt can't be done in vect_mark_pattern_stmts because - the non-SLP pattern matchers already have added the statement to V= INFO - by the time it is called. Some of them need to modify the returned - stmt_info. vect_mark_pattern_stmts is called by recog_pattern and= it - would increase the size of each pattern with boilerplate code to m= ake - the call there. */ - vect_mark_pattern_stmts (vinfo, stmt_info, call_stmt, - SLP_TREE_VECTYPE (node)); + gimple_set_bb (call_stmt, gimple_bb (stmt_info->stmt)); + STMT_VINFO_VECTYPE (call_stmt_info) =3D SLP_TREE_VECTYPE (node); STMT_VINFO_SLP_VECT_ONLY_PATTERN (call_stmt_info) =3D true; /* Since we are replacing all the statements in the group with the s= ame=