From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DFAB5386186A; Mon, 7 Sep 2020 23:46:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFAB5386186A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1599522403; bh=x2XOdTwWwcCobfdElr8j1VLCGNosdxYNjFav+4ZN89g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w9+CQyPSGdk2aCWeiNVSLA6vHhIfO85BD7Sp+zKlxkxS1e6CQSsUyJMTrSIjHOtd7 Us5a2OrMtFSkt/mInjTeABxxP94sT1vlqVcmynIlGoYZkydmobZXC7odob5Ydi6/kl EGpe1qGb5afo6CkKgJ82EULDF1RS7oqheMrfVqns= From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96966] [8/9/10/11 Regression] redundant memcpy not eliminated after pointer subtraction Date: Mon, 07 Sep 2020 23:46:43 +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: 11.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor 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: short_desc cf_known_to_work cf_known_to_fail 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2020 23:46:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96966 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|redundant memcpy not |[8/9/10/11 Regression] |eliminated after pointer |redundant memcpy not |subtraction |eliminated after pointer | |subtraction Known to work| |8.1.0, 8.2.0 Known to fail| |10.2.0, 11.0, 7.3.0, 8.3.0, | |9.2.0 Keywords| |missed-optimization --- Comment #1 from Martin Sebor --- According to Godbolt, GCC 8.1 and 8.2 emit optimal code for both functions = but GCC 8.3 emits the less optimal code for f and has g jump to it. Starting w= ith 10.1, GCC emits the same suboptimal code for both functions.=