<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/130639>130639</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Wider-than-native shifts are compiled inefficiently when the shift count is partially known
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
CatsAreFluffy
</td>
</tr>
</table>
<pre>
On 32-bit platforms, 64-bit shifts can be compiled more efficiently if you know whether or not the shiftcount is greater than 32 or not. For example, in [this Godbolt](https://godbolt.org/z/KM1bTsbjv), `short_shift` and `long_shift` should both be able to skip the `test cl, 32` instruction.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxcks-OnDwQxJ_GXFozgvbAwIHD_hHf4VOUS6QcIxuasXeNjexmJpOnj8xusqucLFW7y1X6WaVkL56oF_WjqJ8LtbEJsX9SnB4iDW6b53uhw3Tvv3qQeNCWYXWK5xCXJPAJmtOuJWNnTjAqD5pgDMtqHU2whEhA82xHS57dHewM97DBqw83uBliQxFCBB8Y2NCbzRg2z2ATXCIppghsVH78_eIRhhCBfqpldZQjWA-ifmRjE_wXJh0ci_pZYGuY1yTkg8BB4HB5Gx1DvAgcfgkc_v9S6W9Jv1wFdtlHNGUyIfKPPYVoSlB-yqoL_vIhJhM2N4EObHJXpR0BB0ivdt07iKZkSgyjy6YS8471ieM2sg3-WEy9nDrZqYL66nyqGqzbqipM37YdnbGW4yzPdNbtLLvT1IyTRjnqM7WF7bHEupRVWTV1U1dHpee2O-HYYYtnWc7iVNKirDs6d11y08KmtFFfybKRXeGUJpd21IiebrBPBWImH_u8dNDbJYlT6Wzi9GHDlh313-1E8ZBpHLxie6U_2FX8xNz6z8BvhvwHWvjLdlWRrXLuvv8FX2zR9f8As2w2fRzDInDISd6PwxrDC40scNjzJ4HDe8Frj78DAAD__zNN7z8">