From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2963B3858D35; Sat, 1 Jul 2023 23:32:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2963B3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688254370; bh=9vXboa/DM3M9kALJWp25errrtLkCeEQwG+r8Nd7T5Fw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sFBNv/aMxUvu+nil0AhOQTz6HoBlPQIbw5RxmznpMuhR4hp9JSAZ3sPQ/xwhubIXo BVJ6S6jxEt6sK/b8Nex1i4v9M7RkqBdoq+PtaPmMo8oj2wX4o4VgKCzoLRIuVZ8+5f 2cFgF+jSCqQF6fCPfcWU6t7hyOn3SfGjgf16oeuQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110515] [12/13/14 Regression] llvm-15.0.7 possibly invalid code on -O3 Date: Sat, 01 Jul 2023 23:32:49 +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: 14.0 X-Bugzilla-Keywords: alias, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords 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=3D110515 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |alias --- Comment #5 from Andrew Pinski --- I am not 100% sure but I think the problem is related to this code (note I added that asm comment there): ``` V *P =3D u.i; V *E =3D P + InlineSlots; for (; P !=3D E; ++P) { if (P->v !=3D EmptyKey) { TmpEnd->v =3D P->v; ++TmpEnd; } } Small =3D false; //asm("":"+m"(*this)::"memory"); u.o =3D LargeRep{new V[128], 128}; ``` The problem is most likely the read from u.i is happening after the store to u.o.=