This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/48510] Does not vectorize loops involving casts from floating point to unsigned integer types


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48510

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-19 10:57:07 UTC ---
We can now vectorize the conversion to unsigned int, it is not possible to
directly convert from double to unsigned long as far as I can see - only
cvttpd2dq exists which is a signed conversion.  Biasing the input value
from [0, ULONG_MAX] to [-LONG_MIN, LONG_MAX] is not possible because of
the different truncation behavior for signed/unsigned values.

As a side-note, C specifies that float -> unsigned integer truncation
only has defined behavior for inputs in the range (-1, Utype_MAX+1).

ICC seems to use some clever range-dependent operations, finally mixing
three cases together with bitwise operations.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]