From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 79011386FC03; Wed, 9 Jun 2021 07:33:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 79011386FC03 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100981] ICE in info_for_reduction, at tree-vect-loop.c:4897 Date: Wed, 09 Jun 2021 07:33:34 +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: 12.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: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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, 09 Jun 2021 07:33:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100981 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |avieira at gcc dot gnu.org --- Comment #2 from Richard Biener --- #1 0x0000000001816089 in info_for_reduction (vinfo=3D0x369bf80,=20 stmt_info=3D0x376e340) at ../../src/trunk/gcc/tree-vect-loop.c:4897 4897 gcc_assert (STMT_VINFO_REDUC_DEF (stmt_info)); (gdb) p debug_gimple_stmt ($1) slp_patt_96 =3D .COMPLEX_FMA (dsdotr.5_21, dsdotr.5_21, dsdotr.5_21); $2 =3D void ah, so we get a reduction stmt SLP pattern-recognized... and while the original scalar stmt_infos are preserved: t.f90:9:8: note: node 0x35cff60 (max_nunits=3D4, refcnt=3D2) t.f90:9:8: note: op template: slp_patt_96 =3D .COMPLEX_FMA (dsdotr.5_21, dsdotr.5_21, dsdotr.5_21); t.f90:9:8: note: stmt 0 dsdotr.5_21 =3D dsdotr.5_20 + _36; t.f90:9:8: note: stmt 1 dsdoti.4_19 =3D dsdoti.4_18 + _37; t.f90:9:8: note: children 0x35cffe8 0x35d0648 0x35d0290 the reduc-info, which is originally attached to the SLP nodes representative is no longer there (it didn't get transfered). Now, actually handling this needs some double-checking and turning the testcase into a runtime one. I'll poke on doing that. The issue is probably latent on the branch where we might want to play safer and simply refuse to pattern recog nodes with a STMT_VINFO_REDUC_DEF (vect_orig_stmt (SLP_TREE_REPRESENTATIVE (node))).=