From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 883123861823; Wed, 24 Mar 2021 09:22:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 883123861823 From: "tnfchris 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 09:22:06 +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: tnfchris 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: bug_status 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 09:22:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99746 Tamar Christina changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #7 from Tamar Christina --- reduced to SUBROUTINE CLAREF(A) LOGICAL BLOCK COMPLEX T1 , V2 COMPLEX A(LDA, *) , SUM LOGICAL LSAME IF (LSAME) THEN IF (BLOCK) THEN DO 130 J =3D ITMP1, ITMP2 SUM =3D T1 * A(J, ICOL1) * A0 + $ V2 * A(J, 2) A(J, ICOL1) =3D -SUM A(J, 2) =3D SUM 130 CONTINUE END IF END IF END which produces the following SLP tree, node 0x4e150c0 (max_nunits=3D2, refcnt=3D1) op template: REALPART_EXPR <(*a_29(D))[_12]> =3D sum$real_60; stmt 0 REALPART_EXPR <(*a_29(D))[_12]> =3D sum$real_60; stmt 1 IMAGPART_EXPR <(*a_29(D))[_12]> =3D sum$imag_61; children 0x4e15720 node 0x4e15720 (max_nunits=3D2, refcnt=3D1) op template: slp_patt_69 =3D .COMPLEX_FMA (sum$real_60, sum$real_60, sum$real_60); stmt 0 sum$real_60 =3D _48 + _58; stmt 1 sum$imag_61 =3D _49 + _59; children 0x4e15500 0x4e15e08 0x4e15ad8 node 0x4e15500 (max_nunits=3D2, refcnt=3D1) op template: _48 =3D a0_31(D) * _46; stmt 0 _48 =3D a0_31(D) * _46; stmt 1 _49 =3D a0_31(D) * _47; children 0x4e15588 0x4e151d0 node (external) 0x4e15588 (max_nunits=3D1, refcnt=3D1) { a0_31(D), a0_31(D) } node 0x4e151d0 (max_nunits=3D2, refcnt=3D1) op template: slp_patt_71 =3D .COMPLEX_MUL (_46, _46); stmt 0 _46 =3D _42 - _43; stmt 1 _47 =3D _44 + _45; children 0x4e15038 0x4e15d80 node (external) 0x4e15038 (max_nunits=3D1, refcnt=3D1) { t1$real_38(D), t1$imag_41(D) } node 0x4e15d80 (max_nunits=3D2, refcnt=3D2) op template: _17 =3D REALPART_EXPR <(*a_29(D))[_5]>; stmt 0 _17 =3D REALPART_EXPR <(*a_29(D))[_5]>; stmt 1 _16 =3D IMAGPART_EXPR <(*a_29(D))[_5]>; load permutation { 0 1 } node 0x4e15e08 (max_nunits=3D2, refcnt=3D2) op template: _50 =3D REALPART_EXPR <(*a_29(D))[_12]>; stmt 0 _50 =3D REALPART_EXPR <(*a_29(D))[_12]>; stmt 1 _51 =3D IMAGPART_EXPR <(*a_29(D))[_12]>; load permutation { 0 1 } node (external) 0x4e15ad8 (max_nunits=3D1, refcnt=3D1) { v2$real_52(D), v2$imag_53(D) } which is correct, but vect_detect_hybrid_slp determines marking hybrid: slp_patt_71 =3D .COMPLEX_MUL (_46, _46); Which is a problem since the patterns are only valid in SLP. I don't quite see why the sub-tree is hybrid though.. it determines marking hybrid: _50 =3D REALPART_EXPR <(*a_29(D))[_12]>; marking hybrid: _51 =3D IMAGPART_EXPR <(*a_29(D))[_12]>; marking hybrid: _48 =3D a0_31(D) * _46; marking hybrid: slp_patt_71 =3D .COMPLEX_MUL (_46, _46); marking hybrid: sum$imag_61 =3D _49 + _59; marking hybrid: _49 =3D a0_31(D) * _47; marking hybrid: _59 =3D _56 + _57; marking hybrid: _56 =3D _50 * v2$imag_53(D); marking hybrid: _57 =3D _51 * v2$real_52(D); marking hybrid: _47 =3D _44 + _45; marking hybrid: _44 =3D _17 * t1$imag_41(D); marking hybrid: _45 =3D _16 * t1$real_38(D); marking hybrid: _16 =3D IMAGPART_EXPR <(*a_29(D))[_5]>; marking hybrid: _17 =3D REALPART_EXPR <(*a_29(D))[_5]>; So either the vect_detect_hybrid_slp is correct but then SLP should be abor= ted or it's not right and this should have been pure. the problem starts because it marks _50 as hybrid, but don't see why it thi= nks that...=