https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117033
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |tree-optimization Severity|normal |enhancement Keywords| |missed-optimization Summary|GCC trunk emits larger code |GCC trunk emits larger code |at -Oz compared to -O2 |at -Os compared to -O2 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is not pass ordering issue. Rather it is more about copy loop header. Specifically about copying the loop header of the inner loop. Basically what happens if we copy the inner loop header, we can remove the outer loop and then sccp can figure out the value (well indirectly via dom). I am not 100% sure this is good testcase and would show up in real code either.