https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101474
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|-fipa-icf generates worse |SRA sometimes produces |code for identical function |worse code with inline | |functions (seen with | |-fipa-icf sometimes) Ever confirmed|0 |1 Last reconfirmed| |2021-07-16 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This worse code generation has nothing to do with -fipa-icf really as shown by: struct t { char x; int y; }; void fn1(struct t *p, struct t v) { *p = v; } void fn3(struct t *p, struct t v) { fn1(p, v); } ------ CUT ---- What is happening is SRA decides it is best to do a full scalar replacement for the v that is inlined into fn3 (from fn1).