From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 43CA23896838; Mon, 12 Apr 2021 06:44:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43CA23896838 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99648] [11 regression] gcc.dg/torture/pr71522.c fails starting with r11-165 for 32 bits Date: Mon, 12 Apr 2021 06:44:25 +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: 11.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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 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, 12 Apr 2021 06:44:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99648 --- Comment #8 from Richard Biener --- (In reply to Jakub Jelinek from comment #7) > --- gcc/simplify-rtx.c.jj 2021-04-09 16:18:24.275668496 +0200 > +++ gcc/simplify-rtx.c 2021-04-09 19:26:24.963134240 +0200 > @@ -7059,12 +7059,19 @@ simplify_immed_subreg (fixed_size_mode o > while (buffer.length () < buffer_bytes) > buffer.quick_push (filler); > } > - else > + else if (!native_encode_rtx (innermode, x, buffer, first_byte, > inner_bytes)) > + return NULL_RTX; > + rtx ret =3D native_decode_rtx (outermode, buffer, 0); > + if (ret && MODE_COMPOSITE_P (outermode)) > { > - if (!native_encode_rtx (innermode, x, buffer, first_byte, > inner_bytes)) > + auto_vec buffer2 (buffer_bytes); > + if (!native_encode_rtx (outermode, ret, buffer2, 0, buffer_bytes)) > return NULL_RTX; > - } > - return native_decode_rtx (outermode, buffer, 0); > + for (unsigned int i =3D 0; i < buffer_bytes; ++i) > + if (buffer[i] !=3D buffer2[i]) > + return NULL_RTX; > + } > + return ret; > } >=20=20 > /* Simplify SUBREG:OUTERMODE(OP:INNERMODE, BYTE) I think this makes sense from a consistency point of view. > Makes simplify_subreg fail when trying to subreg a constant into a compos= ite > floating mode that doesn't decode back. > Unfortunately, this causes ICE: > pr71522.c: In function =E2=80=98main=E2=80=99: > pr71522.c:27:1: error: unrecognizable insn: > 27 | } > | ^ > (insn 5 2 6 2 (set (reg/v:TF 118 [ d ]) > (subreg:TF (const_vector:V16QI [ > (const_int 65 [0x41]) repeated x15 > (const_int 0 [0]) > ]) 0)) "pr71522.c":20:3 -1 > (nil)) > during RTL pass: vregs >=20 > store_bit_field_1 calls simplify_gen_subreg and that when > simplify_immed_subreg fails will happily create the above subreg. > So I'm quite afraid the above change could break quite a lot and so might= be > better to defer it for GCC12. Hmm, yeah. I suppose we can force the constant to memory and do the subreg via a load?=