From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6A72F3846024; Fri, 10 May 2024 15:32:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A72F3846024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715355154; bh=hfY01pl2/ONyk7VTPZG3YoSRWsP9CrdursCXc5Fc79o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PnUwNNWjZ9FkbYPuV6dVunVHf2RylO8YMLbv6ZVFsnmY5zxl/WOI1RtNv6Qy51K7r /6GP1sdHWHjqnqFb6TsSz2Le8CyxUwZuui0HsmF95TIu+wI/vFN7fQv/TwvxkQdR1X JulbZLz6kSo5/rZmLnoPtuEdcu7WxkaUYZemHRFs= From: "xxs_chy at outlook dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115034] Missed optimization: reduntant store of identical value in the slot Date: Fri, 10 May 2024 15:32:34 +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: xxs_chy at outlook dot com 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=3D115034 --- Comment #2 from XChy --- (In reply to Andrew Pinski from comment #1) > Note there is some memory model requirements here that I always forget if > this can happen or not. Hmm. Could you please provide some documents about the memory model of GCC = or specific constraints about C language? The semantics of IR in the LLVM issue look good to me, since the store is non-volatile and non-atomic. But I'm not sure how it would be after lifting to C.=