https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23813
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
Target Milestone|--- |5.0
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So this has been fixed in GCC 5.0 and above as it is able to detect bswap and
do the correct thing there.
That is it is able to convert:
REV64_STEP(n, 8, 0x00FF00FF00FF00FFULL); /* bytes */
REV64_STEP(n, 16, 0x0000FFFF0000FFFFULL); /* halfwords */
REV64_STEP(n, 32, 0x00000000FFFFFFFFULL); /* full words */
Into:
n = __builtin_bswap64 (n)