Fun fact about large shifts being undefined.<p>With a 32 bit x, the expression x &lt;&lt; b | x &gt;&gt; (32 - b) can be translated to a single &quot;roll x b bits to the left&quot; instruction. But it is only possible if &gt;32 shifts are treated as undefined.