C++ Compilers Generating Rotate Instructions

C++ Compilers Generating Rotate Instructions

I just did a quick test in Compiler explorer and it was nice to see both GCC and Clang generating single rotate instructions from these equivalent sequences of operations. inline uint32_t uint32_rol(uint32_t _a, int _sa) { return ( _a << _sa) | (_a >> (32-_sa)…

Read More