https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86723

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|not optimizing with bswap   |not optimizing with bswap,
                   |when casting to/from int to |that casts to int aftwards
                   |unsigned long long          |

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Shorter testcase (which shows it is unrelated to inlining):
int swap_unsigned(unsigned long long value)
{
    return ((value & 0x00000000000000ffull) << 56)
            | ((value & 0x000000000000ff00ull) << 40)
            | ((value & 0x0000000000ff0000ull) << 24)
            | ((value & 0x00000000ff000000ull) << 8)
            | ((value & 0x000000ff00000000ull) >> 8)
            | ((value & 0x0000ff0000000000ull) >> 24)
            | ((value & 0x00ff000000000000ull) >> 40)
            | ((value & 0xff00000000000000ull) >> 56);
}

Reply via email to