https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101120
Bug ID: 101120 Summary: vn_reference_maybe_forwprop_address can take much compile-time Product: gcc Version: 11.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- For polyhedron doduc.f90 I see tree FRE : 5.05 ( 47%) 0.03 ( 14%) 5.16 ( 46%) 5780k ( 3%) with -Ofast -march=haswell and tree iv optimization : 4.99 ( 40%) 0.13 ( 33%) 5.28 ( 40%) 218M ( 51%) with -Ofast Resulting from the vectorizer generating chains of constant adds (_1 = _2 + 8 + 8 + 8 + 8 spread across multiple stmts). There's duplicate bugs for this around but a possible cheap mitigation would be to fold those to create cheaper to walk use-def chains for the passes between vectorization and the next forwprop pass.