From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B1C1B385842F; Thu, 13 Oct 2022 22:07:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1C1B385842F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665698872; bh=DJrUCDlc/brIxZzYQalLfTMdiUdeCJNtxCyzv8vaZho=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OyLF7iUpQV+L8n8awpMMhOC0M41Bou8DJ9JAu7booJSC4qBvZZTeIf2pIisUA6Xt+ FZ+BaU494V7Y3OJ0tSxAsXg4rJwByAEzqkp7fsVVYh9M/JIAjKQZW5wq86WwlP37ST z/J2a3yqsd19jM6xFNNYHZV8fwMlun9b2DZa/nng= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107172] [13 Regression] wrong code with "-O1 -ftree-vrp" on x86_64-linux-gnu since r13-1268-g8c99e307b20c502e Date: Thu, 13 Oct 2022 22:07:51 +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: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107172 --- Comment #28 from Segher Boessenkool --- > So the issue is with the consumer: >=20 > (insn 50 49 51 2 (parallel [ > (set (reg:SI 93) > (neg:SI (ltu:SI (reg:CCC 17 flags) > (const_int 0 [0])))) > (clobber (reg:CC 17 flags)) > ]) "107172.c":4:10 1258 {*x86_movsicc_0_m1_neg} > (expr_list:REG_DEAD (reg:CCC 17 flags) > (expr_list:REG_UNUSED (reg:CC 17 flags) > (nil)))) >=20 > There are many similar patterns in different backends. They work as long= as > the flags register isn't a known constant since simplify-rtx.cc leaves th= em > alone. They become a problem only when the flags register is a known > constant. Such patterns are fine. The problem is that this consumer of MODE_CC does = not fit together with the producer of that reg 17: it only has meaning together, that is how this stuff works; and it has no meaning at all like this.=