https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88626
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-01-02 Ever confirmed|0 |1 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- The __builtin_constant_p call itself is "free" but whether guarded code is "free" isn't easy to determine. I guess what you want is the computation of "b" which is only used when it is constant is considered "free"? Confirmed for that. Not sure how easy to implement though.