From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EE47B3858D32; Tue, 26 Dec 2023 14:23:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE47B3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703600591; bh=+SiklCMkxPGN+msOQPSzek6YDMJg9aJCgIjj3i2faQY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NIvqrIwOru3Du0lpW5cIerHREhxfWrFcnu89G2aW0jZhosyq7zB1mebZqmB92rOuE vTwvdO9PIzQr5Rzqzjew60M77hBJF6Qg0hfEI1u/YKuiMmBXlCqDNkT877NlcKs8Bi eU3ZwCAn1+cChfFWLS0M0vaYG4lkL+gyLM+/76mU= From: "tnfchris at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113137] [14 regression] Failed bootstrap with -O3 -march=znver2 Date: Tue, 26 Dec 2023 14:23:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tnfchris at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D113137 --- Comment #5 from Tamar Christina --- Simpler reproducer: int b; void a() __attribute__((__noreturn__)); void c() { char *buf; int bufsz =3D 64; while (b) { !bufsz ? a(), 0 : *buf++ =3D bufsz--; b -=3D 4; } } The loop has an inverted control flow that accesses memory. The testcase doesn't seem to have existing cases for these, but due to the inverted nature the loop's main exit is before the latch exit which we now consider the early exit. because we only analyze early exits we miss that there's a memory reference that needs to be moved, and because it wasn't moved the vUSEs don't line up. will fix tomorrow when back at work.=