From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C32F53861012; Mon, 19 Jul 2021 11:26:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C32F53861012 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101505] [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) Date: Mon, 19 Jul 2021 11:26:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target 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: 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: Mon, 19 Jul 2021 11:26:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101505 --- Comment #2 from Richard Biener --- vectorizable_lc_phi get's the vectorized stmts of _4 =3D xb_17 <=3D 0; but = sees the mask rather than the pattern stmt used to produce the desired result. The def_stmt is vect_used_in_outer, and otherwise the use stmt is "dead". We also failed to mark the pattern. That said, the failure looks like it is in bool pattern recog which fails to see the use of _4 =3D xb_17 <=3D 0 in non-bool context here. [local count: 715863673]: # xb_17 =3D PHI # qp_19 =3D PHI # ivtmp_15 =3D PHI _4 =3D xb_17 <=3D 0; xb_5 =3D (short int) _4; qp_7 =3D qp_19 + 1; ivtmp_6 =3D ivtmp_15 - 1; if (ivtmp_6 !=3D 0) goto ; [66.67%] else goto ; [33.33%] [local count: 357878152]: # _18 =3D PHI <_4(4)> _8 =3D (char) _18; retval.2[iter.3_10] =3D _8; iter.3_11 =3D iter.3_10 + 1; ivtmp_16 =3D ivtmp_3 - 1; if (ivtmp_16 !=3D 0) goto ; [100.00%] else goto ; [0.00%] I've fixed this once for BB vect but not loop vect (I guess due to lack of a testcase).=