From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 13BD03857C7B; Mon, 15 Feb 2021 22:03:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13BD03857C7B From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/99114] [WORD_REGISTER_OPERATIONS] wrong code for (u16_var & 3) == (u32)1 Date: Mon, 15 Feb 2021 22:03:26 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: WAITING 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: bug_status cc everconfirmed cf_reconfirmed_on 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, 15 Feb 2021 22:03:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99114 Eric Botcazou changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING CC| |ebotcazou at gcc dot gnu.o= rg Ever confirmed|0 |1 Last reconfirmed| |2021-02-15 --- Comment #1 from Eric Botcazou --- Please provide a reproducer as documented in https://gcc.gnu.org/bugs > The assumption here is that op0 will be an (and:HI) after the first > statement (and we assume (subreg:SI (and:HI ... (const_int 3))) is > defined because of WORD_REGISTER_OPERATIONS) but it's actually > simplified to be just the (reg:HI 593), and (subreg:SI (reg:HI 593)) > is not defined. Paradoxical registers are defined under specific circumstances though. > I'm unsure whether this can cause wrong code for in-tree backends or > backends which don't define WORD_REGISTER_OPERATIONS. Well, obviously not for the latter, see the comment just above the code.=