https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80218
Bug ID: 80218 Summary: [6/7 Regression] tree-call-cdce does not update block frequencies Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rsandifo at gcc dot gnu.org Target Milestone: --- tree-call-cdce.c updates the edge probabilities and counts, but doesn't do anything to the block frequencies or counts. This causes the register allocator to treat the fallback errno-setting calls as being much hotter than they really are. Although the bug goes back to at least GCC 5, GCC 6 patch r230488 caused us to use the code much more often than previously. In an internal benchmark, we were seeing spills in hot code that were confined to the "error" path in GCC 5 but are on the hot path in GCC 6 and later. I think this therefore counts as a GCC 6 regression.