From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7292F3858C60; Mon, 24 Jul 2023 15:14:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7292F3858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690211651; bh=s4QTug+vuyqvHdzRD4oGdHzJC9f7xdI6FhqCnh0WCis=; h=From:To:Subject:Date:In-Reply-To:References:From; b=epbbnMJCfvjwwX1HYbYcVkxrK9fguHWzT5afwG74CSk5pgsafMy0EofD/APn+f4du Kk/EEUDAC2wB1hXQBJME2f4pQ+YuiTmPwf3l5sZJHwVQS0o3t+2ivjfGCdt8nDuUZC yOcj3xCtpLJd79zHpH937zvT7tecexeD5S2IMrjw= From: "wilco at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110791] [12/13/14 Regression] arm: Wrong code with -Os -march=armv8.1-m.main Date: Mon, 24 Jul 2023 15:14:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: wilco 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: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed component 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110791 Wilco changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Component|rtl-optimization |middle-end Status|UNCONFIRMED |NEW --- Comment #6 from Wilco --- (In reply to Alex Coplan from comment #5) > Thanks Wilco for the simpler example. >=20 > It seems to have started with > r13-1268-g8c99e307b20c502e55c425897fb3884ba8f05882 with both of these > testcases, but it's probably a latent issue elsewhere (since it doesn't s= eem > to show up on other targets). Needs more analysis. The bug happens on all targets with -fmodulo-sched -Os, eg. AArch64: bug: sub x2, x1, x0 add x2, x2, 1 cmp x0, x1 bhi .L7 cmn x0, #1 bne .L9 .L7: mov x2, 1 .L9: subs x2, x2, #1 beq .L1 ldrb w0, [x1, -1] cmp w0, 47 beq .L6 .L1: ret .L6: sub x1, x1, #1 b .L9=