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

    <tr>
        <th>Summary</th>
        <td>
            How can I disable the ext from i16 to i32 in Clang? When can Clang generate @llvm.sadd.with.overflow.i16?
        </td>
    </tr>

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

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

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

<pre>
    I find that when two i16 numbers or i8 numbers are added, it will be extended to i32.  Even if I choose to compile it with '-fsanitize=undefined'. So, How can generate the intrinsic 'call @llvm.sadd.with.overflow.i16' ? Additional, how can I find the implementation of llvm.sadd.with.overflow.* in LLVM source code? It's a bit challenging for newbies. Thanks!
<img width="305" alt="image" src="https://github.com/llvm/llvm-project/assets/39987919/8fa47e70-7ba9-46ee-bf34-f52eaf9aebe9">

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU02PpDYQ_TXmUmoENl8-cOh0L9qRNqdEydnGBVRi7BY2w2R-fWR6NHOKoj0hP6pefbxXKgSaHWLP6l9Yfc_UHhe_9e_Lg9zcFV2RaW_-6V9gImcgLirCsaCDeHigsgG3rxq3AH4D6j5fakNQxqBh_AYU4SBrQSPgW0Rn0ED0QILnAN9e0QFN8ALj4n3A9Gf064MsPhPjAoy3lykoR5HekYn77gxO5BJ7m8NvPhX57g8YlYMZHW4qIsQFgVzcyAUaE8WorAVWFda-rnlQxuSJPPevuE3WHzmVDeMtMDHA1RiK5J2yiXr5oP7cAQKtD4sruqhSGPgJ_ouV8SuQgx8__vgVgt-3EWH0BlOVl8h4G0CBpgjjoqxFN5ObYfIbODw0Ycjh90W5vwPjJSvurLgycaN1hoNMXJi4M85FUTPOQdn4fNOqZkxI2MYnssT4CExcGR8YH2aKy67z0a-MD6ntj8_lsfm_cIyMDyoEjIHxQUjZtbKUjA_dpKoW2-LSaiUvVYN40ZOoLlPNUU1SoUbJOGfi27PRzPTCSCFVhn3ZyKrualG32dJXRnat6SZeqq7mreqkqbuRSzPVuq1MkVHPCy4KWYqiKWTZ5lzqtix13YimVKNGVhW4KrL5uXS_zRmFsGPfNGVbZFZptOH0M-ejVW5ObfEb49zhAWdoQup7tvXn4HqfQzIGhRi-OCNFi_33T_ENBaXt01j4FmHa_HqewNPLSeXbWU0M8Gc6kZR2Il-m_B_7iSHbN9v_tF7nTEmvcwP_BgAA__91pjmO">