From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BF3DA3870868; Tue, 16 Feb 2021 18:27:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF3DA3870868 From: "pipcet at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/99114] [WORD_REGISTER_OPERATIONS] wrong code for (u16_var & 3) == (u32)1 Date: Tue, 16 Feb 2021 18:27:16 +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: pipcet at gmail dot com 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: cc attachments.created 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: Tue, 16 Feb 2021 18:27:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99114 pipcet at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pipcet at gmail dot com --- Comment #5 from pipcet at gmail dot com --- Created attachment 50203 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50203&action=3Dedit RTL dump of last pre-combine pass (Gzipped because of the file size limit). The relevant section is around th= is code: (note 4724 4779 4727 667 [bb 667] NOTE_INSN_BASIC_BLOCK) (insn 4727 4724 4728 667 (set (reg:SI 2326) (ashift:SI (subreg:SI (reg:HI 799 [ hrsi$word_no ]) 0) (const_int 16 [0x10]))) "../../../src/gcc/gcc/hard-reg-set.h":3= 11:7 10 {*assignsi_binop} (nil)) (insn 4728 4727 4729 667 (set (reg:SI 2326) (lshiftrt:SI (reg:SI 2326) (const_int 16 [0x10]))) "../../../src/gcc/gcc/hard-reg-set.h":3= 11:7 10 {*assignsi_binop} (nil)) (jump_insn 4729 4728 4730 667 (set (pc) (if_then_else (gtu (reg:SI 2326) (const_int 1 [0x1])) (label_ref 4783) (pc))) "../../../src/gcc/gcc/hard-reg-set.h":311:7 20 {*cbranch= si4} (expr_list:REG_DEAD (reg:SI 2326) (int_list:REG_BR_PROB 39298956 (nil))) -> 4783)=