https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86434
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Are these examples from real-world code? Because I can create examples where early folding is necessary as well... It's really not an easy black-and-white decision. Consider void f (int i) { if (__builtin_strlen (&a[i]) != 3 - i) { ... large code ... } } void g () { f (1); } where not folding and eliding the conditionaly will prevent inlining from happening. The usual "solution" is to do value-range analysis and folding at the same time - thus avoiding pass inter-dependences by just having a single pass.