https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107050
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> --- Splitting blocks in shrink-wrap will cause degraded performance compared to the status quo, on average. If I understand what will be split how, that is? It certainly can be good to move more code, much much more than prepare_shrink_wrap does, but that is a good trade-off most of the time only because it makes the fast path faster, makes less code executed when there is an early return: just randomly moving code to be executed later makes code *slower*. Where shrink-wrapping duplicates code here only one copy is executed, ever. The question seems to really be why at -O1 global variable accesses are not optimised very well? The answer to that is this is -O1, if you want good optimisation you should use -O2!