https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77859
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-10-05 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The reason is that without -fno-trapping-math if-conversion fails as iftmp.0_7 = _1 - 1.57079637050628662109375e+0; tree could trap... and we are gimplifying gi ? xx-pi2 : xx into control flow (I'm not 100% sure what the standard says to the conditional operator and short-circuiting of side-effects but I guess it is a short-circuite operation). So, confirmed, but I don't see how we could fix this. You might be able to fix it by moving xx-pi2 compute to a separate statement. OTOH sinking may cause us ending up with exactly the same IL for if-conversion.