From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F22D385DC14; Fri, 9 Apr 2021 16:48:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F22D385DC14 From: "jakub 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: Fri, 09 Apr 2021 16:48:19 +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: jakub 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: 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: Fri, 09 Apr 2021 16:48:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99648 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW --- Comment #6 from Jakub Jelinek --- Ok, I can finally reproduce, one needs -m32 -Os -mcpu=3Dpower7 (or power8 or power9) to reproduce. And the bug is created in store_bit_field_1 doing: rtx sub; HOST_WIDE_INT regnum; poly_uint64 regsize =3D REGMODE_NATURAL_SIZE (GET_MODE (op0)); if (known_eq (bitnum, 0U) && known_eq (bitsize, GET_MODE_BITSIZE (GET_MODE (op0)))) { sub =3D simplify_gen_subreg (GET_MODE (op0), value, fieldmode, 0); if (sub) { if (reverse) sub =3D flip_storage_order (GET_MODE (op0), sub); emit_move_insn (op0, sub); return true; } } (there is similar code later on). value is (const_vector:V16QI [ (const_int 65 [0x41]) repeated x15 (const_int 0 [0]) ]) simplify_gen_subreg from V16QImode to TFmode makes (const_double:TF 4.5232690196078126318752765655517578125e+6 [0x0.8a0a0a0a0a0904p+23]) out of that and the problem is that this constant doesn't convert back to v= alue when simplify_gen_subreg converted back to V16QImode, instead it yields (const_vector:V16QI [ (const_int 65 [0x41]) (const_int 81 [0x51]) (const_int 65 [0x41]) repeated x5 (const_int 32 [0x20]) (const_int 62 [0x3e]) (const_int 0 [0]) repeated x7 ]) So, to me this looks like a dup of PR95450, except in simplify-rtx.c rather than in fold-const.c. Do we want to do the same thing in simplify_subreg and try to convert back = for MODE_COMPOSITE_P?=