https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105337
Marek Polacek <mpolacek at gcc dot gnu.org> 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 <mpolacek at gcc dot gnu.org> --- 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 */);