<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/61408>61408</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            NVPTX generates the wrong PTX instruction for `__usAtomicCAS`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          seanbaxter
      </td>
    </tr>
</table>

<pre>
    `cmpxchg` on 16-bit operands broke LLVM for all versions before 15. On 15/16, code generation finishes, but it generates a `atom.global.cas.b32` instead of the expected `atom.global.cas.b16`.
https://gist.github.com/seanbaxter/0991104f39af1d02a93fda1e91322ead
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxskU9v3CAQxT8NvqC1YGxj--DDNpFP6R-pVdRbxJ_BpsWwApxsv33lbatEVU5IPL2ZN78nc3ZLQJxI94F095XcyxrTlFEGJa8FU6Wi-TURwfR2uep1IYLRGCgXJ-UKjRdMMphMVYo_kT48PH6kNiYqvafPmLKLIVOFNiakvKvp50B5R2DmgsAd1dEgXTBgksXFQK0LLq-YD03thbryT8VMJSWCyRK3evFRSV9rmWvVwBHIhVxQGhotLStSvF5QFzTvOrgggtWE3RN2Xku5ZNKcCcwE5sXlUi-urLuqddwIzK8YCMxsHDlnrW1GablhIMfGGslx5A0ASlOZqTFjM8oKJy76YeANg6Fap14bYTmANCAYyG5oBzto2_Ku12qAoXITMGhYw1suup4NNetHYWUrLdpWjH1DWoabdL72_nmrY1oql_OOk-AtGyovFfp8axAg4Au9iQTgKDRNh-ek9iWTlnmXS36dUlzxOH16_PLt-xvSB8KXFMNCj_-Dbdr1n4JiOpg-Pe35XOLm9N35KxGs2pOf_mf5BuOx7-9zuqT4A3UhMN9SZgLz7YrfAQAA__9J3c_K">