https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88702
--- Comment #4 from Jan Hubicka <hubicka at ucw dot cz> --- > The only pass that can do about this (at least right now) is reassoc (both 1 > and 2), which is too late for inlining. So, either teach fnsplit not to > separate multiple if comparisons of the same variable against constants, or > schedule reasoc or just the maybe_optimize_range_tests part thereof in some > early pass. Yep, I also found out about reassoc. Teaching fnsplit to pattern match this is just a partial solution - we would still miscalculate size of function body for functions like this (which indeed look quite common). I will experiment with early reassoc. I kind of debugged what happens later. Because code is compiled with -O2 and growth gets positive for both inlines and functions are not inline, we won't inline.