From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 662B73858401; Fri, 26 Apr 2024 13:59:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 662B73858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714139969; bh=Vvw/gtxglzIeYhattPN9QQaTv+rJCRbhBJGSItE1hqg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZmH6m4Yj1m4WZlvzgOP68n3Nbdit8PCLNaD3WBEZ9FoPNhnEFIoouoSvbqGSY3mX1 kTri4V8+vtUNoXJF/XkO2zbCc+MxMSwxNSp4OougffIMu+dTfIppS8EkaphHj4yWLt VRFT+etEXWwmvJ+WzGD9cjlsn8cIXJHLdcTFT5EI= From: "clyon at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114801] [14/15 Regression] arm: ICE in find_cached_value, at rtx-vector-builder.cc:100 with MVE intrinsics Date: Fri, 26 Apr 2024 13:59:28 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: clyon at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: clyon at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114801 --- Comment #7 from Christophe Lyon --- (In reply to Jakub Jelinek from comment #4) > (In reply to Christophe Lyon from comment #3) > > lowpart_subreg does not work either. > >=20 > > If we put the predicates in a variable in the testcase, then in > > function_expander::add_input_operand() x is already a (subreg/s/v:HI (r= eg:SI > > 116 [ _3 ]) 0) so taking gen_lowpart of that is OK (we just want HImode= to > > get the 16 bits of predicates). >=20 > If x could be e.g. (subreg:SI (reg:DI ...) ...), then one needs to use for > GET_CODE (x) =3D=3D SUBREG && GET_MODE (x) !=3D mode do a force_reg first. >=20 No sure I got this right: if (GET_CODE (x) =3D=3D SUBREG && GET_MODE (x) !=3D mode) x =3D force_reg (mode, x); breaks the assert in emit_move_insn because mode is V4BImode and 'y' is HIm= ode. > > But when predicates are passed as a constant as in the testcase, we have > > x =3D (const_int -13108 [0xffffffffffffcccc]) > > and gen_lowpart (HImode, x) fails on that. >=20 > Why doesn't lowpart_subreg (mode, x, GET_MODE (x) =3D=3D VOIDmode ? DImod= e : > GET_MODE (x)); > work? > I.e. for CONST_INTs assume it is some constant in a mode equal or wider t= han > mode. > Unless mode can be TImode or x can be __int128 constants, that is. > This fails because down the call chain from lowpart_subreg, we reach gcc_unreachable in rtx_vector_builder::find_cached_value because m_mode =3D= =3D V4BImode (so is MODE_VECTOR_BOOL), but is not a valid expected boolean cons= tant vector.=