https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119482
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- With flatten enabled at -O2 I get an ICE: during IPA pass: inline Interpreter.cpp:3841:1: internal compiler error: in redirect_callee, at cgraph.cc:1391 0x293749f internal_error(char const*, ...) /home/apinski/src/upstream-gcc-match/gcc/gcc/diagnostic-global-context.cc:517 0xab270f fancy_abort(char const*, int, char const*) /home/apinski/src/upstream-gcc-match/gcc/gcc/diagnostic.cc:1749 0x8b200f cgraph_edge::redirect_callee(cgraph_node*) /home/apinski/src/upstream-gcc-match/gcc/gcc/cgraph.cc:1391 0x116c808 redirect_to_unreachable /home/apinski/src/upstream-gcc-match/gcc/gcc/ipa-fnsummary.cc:266 0x116c808 edge_set_predicate /home/apinski/src/upstream-gcc-match/gcc/gcc/ipa-fnsummary.cc:290 0x116cc3f remap_edge_summaries /home/apinski/src/upstream-gcc-match/gcc/gcc/ipa-fnsummary.cc:4355 0x116ff50 ipa_merge_fn_summary_after_inlining(cgraph_edge*) /home/apinski/src/upstream-gcc-match/gcc/gcc/ipa-fnsummary.cc:4519 0x1187605 inline_call(cgraph_edge*, bool, vec<cgraph_edge*, va_heap, vl_ptr>*, int*, bool, bool*) /home/apinski/src/upstream-gcc-match/gcc/gcc/ipa-inline-transform.cc:522 0x278d2b3 flatten_function /home/apinski/src/upstream-gcc-match/gcc/gcc/ipa-inline.cc:2557 0x279075a ipa_inline /home/apinski/src/upstream-gcc-match/gcc/gcc/ipa-inline.cc:2880 Note without flatten, the total time at -O2 was 18s (with -fno-checking) and 40s (with checking). So if anything I think the timing reported here is due to that.