From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5A1F73858C33; Fri, 7 Jul 2023 05:12:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A1F73858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688706752; bh=bShBCaDJrtyDQQ2sM3NXxEd5Baef/hmkbrY3oSbXuVk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kGMLV+P1vboB3nU71QumtxIwy9nyVQqXPKWYHS73ISiuvAcWt4wEc25WKjgBlNoKT UOr23aH6pwYk3qTg3HXtNvaNnglLtKXXeMQo6mTcKfwBOxj21D79e/v5GAP0N/bBsd rmnAC+tJmBStNKgQLCs03zSeFsJIULKzHp8+j3dg= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/104914] [MIPS] wrong comparison with scrabbled int value Date: Fri, 07 Jul 2023 05:12:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: --- 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=3D104914 --- Comment #12 from Andrew Pinski --- (In reply to Andrew Pinski from comment #11) > But I don't have any other notes on my change (nor a testcase). So I found some notes and it is similar but still different. We were expanding: ;; insn.j_format.target =3D D.21597_19; Into (insn 25 24 26 (set (reg:DI 220) (lshiftrt:DI (reg:DI 196 [ D.21584 ]) (const_int 2 [0x2]))) arch/mips/kernel/jump_label.c:56 -1 (nil)) (insn 26 25 0 (set (zero_extract:SI (reg/v:SI 208 [ insn ]) (const_int 26 [0x1a]) (const_int 6 [0x6])) (subreg:SI (reg:DI 220) 4)) arch/mips/kernel/jump_label.c:56 -1 (nil)) But the subreg there was incorrect. In this case of this bug, the reg is DI rather than SI. I wonder why we have that in the first place even though val is the size of SImode ...=