This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/48510] Does not vectorize loops involving casts from floating point to unsigned integer types
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Jul 2012 10:57:07 +0000
- Subject: [Bug target/48510] Does not vectorize loops involving casts from floating point to unsigned integer types
- Auto-submitted: auto-generated
- References: <bug-48510-4@http.gcc.gnu.org/bugzilla/>
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.