https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69014
--- Comment #9 from Jeffrey A. Law <law at redhat dot com> --- blah_lsm.4_3 has a known constant value (1), so it should have propagated into the PHI node at the start of BB5, but that in and of itself probably doesn't account for the code quality regression. -Os might be inhibiting jump threading. I don't recall specifically when the threading through joiner blocks went in, nor the later tweak to not do that when -Os is in effect. But if we allowed threading through the joiner in 4.8, but not in 4.9 with -Os, that might explain the difference.