[Bug tree-optimization/77859] Ofast needed to vectorize loop in presence of conditional code
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 5 09:29:00 GMT 2016
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.
More information about the Gcc-bugs
mailing list