From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB900385E02A; Thu, 21 Apr 2022 16:32:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB900385E02A From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105337] [12 Regression] wrong code at -Os and above on x86_64-linux-gnu Date: Thu, 21 Apr 2022 16:32:16 +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: unknown X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority bug_status target_milestone cc everconfirmed keywords cf_reconfirmed_on short_desc 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: Thu, 21 Apr 2022 16:32:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105337 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 Status|UNCONFIRMED |NEW Target Milestone|--- |12.0 CC| |aoliva at gcc dot gnu.org, | |mpolacek at gcc dot gnu.org Ever confirmed|0 |1 Keywords| |wrong-code Last reconfirmed| |2022-04-21 Summary|wrong code at -Os and above |[12 Regression] wrong code |on x86_64-linux-gnu |at -Os and above on | |x86_64-linux-gnu --- Comment #2 from Marek Polacek --- Confirmed. Started with r12-397-gda9e6e63d1ae22, in particular this hunk: --- a/gcc/passes.def +++ b/gcc/passes.def @@ -336,8 +336,9 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_thread_jumps); NEXT_PASS (pass_vrp, false /* warn_array_bounds_p */); /* Threading can leave many const/copy propagations in the IL. - Clean them up. */ - NEXT_PASS (pass_copy_prop); + Clean them up. Instead of just copy_prop, we use ccp to + compute alignment and nonzero bits. */ + NEXT_PASS (pass_ccp, true /* nonzero_p */); NEXT_PASS (pass_warn_restrict); NEXT_PASS (pass_dse); NEXT_PASS (pass_cd_dce, true /* update_address_taken_p */);=