From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 154D03858C2D; Tue, 12 Sep 2023 11:58:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 154D03858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694519928; bh=B5h7iZnU8EWENB9AuaKzG0pVrz0k32KsUsoWDSMfIcQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lwagpK0cUe1o9+XcF2qj2zmwRJigxKyWvXsvQT8JDtEeasvSqLFetnJbjn7L81F5O pIEPf2i0QgfS89VOn1DoYNMDklw+UtB0SeV/ziH4gko/uJ/+sQu7Xr6eikmxJJkoF1 m8IFw5vNRMT3/LS1tUUm70Ykbw6xoE6bwUsNoo80= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111337] ICE in gimple-isel.cc for RISC-V port Date: Tue, 12 Sep 2023 11:58:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111337 --- Comment #4 from rguenther at suse dot de --- On Tue, 12 Sep 2023, juzhe.zhong at rivai dot ai wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111337 >=20 > --- Comment #3 from JuzheZhong --- > (In reply to Richard Biener from comment #2) > > vect_patt_67.34_168 =3D VEC_COND_EXPR > }>; > > vect_patt_68.35_169 =3D (vector([4,4]) int) vect_patt_67.34_168; > >=20 > > -> > >=20 > > vect_patt_68.35_169 =3D VEC_COND_EXPR > }>; > >=20 > > this one looks odd - it's probably > >=20 > > /* Sink unary conversions to branches, but only if we do fold both=20 > > and the target's truth type is the same as we already have. */ > > (simplify > > (convert (vec_cond:s @0 @1 @2)) > > (if (VECTOR_TYPE_P (type)=20 > > && types_match (TREE_TYPE (@0), truth_type_for (type))) > > (vec_cond @0 (convert! @1) (convert! @2))))=20 > >=20 > > the problem is that this happily produces a vec_cond we might not be ab= le > > to expand - having the same truth type for the data type isn't enough > > if there's no optab with a matching data mode. Same for the view_conve= rt > > case. > >=20 > > It's a bit convoluted to ask for target support here, can you double-ch= eck > > it isn't possible to add native riscv expanders for the missing case? >=20 > You mean support(In reply to Richard Biener from comment #2) > > vect_patt_67.34_168 =3D VEC_COND_EXPR > }>; > > vect_patt_68.35_169 =3D (vector([4,4]) int) vect_patt_67.34_168; > >=20 > > -> > >=20 > > vect_patt_68.35_169 =3D VEC_COND_EXPR > }>; > >=20 > > this one looks odd - it's probably > >=20 > > /* Sink unary conversions to branches, but only if we do fold both=20 > > and the target's truth type is the same as we already have. */ > > (simplify > > (convert (vec_cond:s @0 @1 @2)) > > (if (VECTOR_TYPE_P (type)=20 > > && types_match (TREE_TYPE (@0), truth_type_for (type))) > > (vec_cond @0 (convert! @1) (convert! @2))))=20 > >=20 > > the problem is that this happily produces a vec_cond we might not be ab= le > > to expand - having the same truth type for the data type isn't enough > > if there's no optab with a matching data mode. Same for the view_conve= rt > > case. > >=20 > > It's a bit convoluted to ask for target support here, can you double-ch= eck > > it isn't possible to add native riscv expanders for the missing case? >=20 > You mean we should add "vcond" patterns back ? No, add the missing vcond_mask one? But maybe I'm misunderstanding the problem.=