[Bug middle-end/60540] Don't convert int to float when comparing int with float (double) constant
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 15 15:13:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60540
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Don't convert int to float |Don't convert int to float
|when comparing int with |when comparing int with
|float constant |float (double) constant
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>In this case an integer comparison could be done instead, which does not require converting the integer variable to float/double.
Well the C standard requires it, though we could optimize it away since 32bit
integers can be exactly represented in a 64bit IEEE double.
More information about the Gcc-bugs
mailing list