From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5FB693858427; Fri, 2 Sep 2022 06:32:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5FB693858427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662100338; bh=BfCQ8SpVrZMeni8wEVOCzDba/ea1f0+WAzEQtApDh1E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YDRD4e+kwxqCBsNLVs16QxtvuGbTIXiiI4k6dUl0TcbdFLCn91Dfgm03bCOUqQniI UJoIjDBvAq9urj8Wv1as3NOcL+RLthl2Cr1HgGAgoV8RiavVPYl5v9lAn4L+gQagsR vCkR42w+rGP1xzL+I37UqRns4ZbZ37RUWM4yXXlo= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference Date: Fri, 02 Sep 2022 06:32:18 +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: 12.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth 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: 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=3D106804 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #7 from Richard Biener --- Yeah, the sink pass sink_common_stores_to_bb could be enhanced to do this though it's somewhat questionable when doing so is profitable - it requires two PHIs, one for the pointer and one for the stored value, which means possibly two copies on the edge(es) to the common store. In fact I'd say the reverse transformation is more profitable?=