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

    <tr>
        <th>Summary</th>
        <td>
            [AArch64][GlobalISel] llvm.fptoui.sat.i32.f128 miscompile
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:AArch64,
            miscompilation,
            llvm:globalisel
      </td>
    </tr>

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

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

<pre>
    Per https://github.com/rust-lang/compiler-builtins/pull/760, LLVM 20 appears to be miscompiling fptoui.sat.i32.f128 on AArch64 when GlobalISel is used.

Assembly for LLVM 19 and LLVM 20: https://llvm.godbolt.org/z/n3K4MEG7r

Likely related to https://github.com/llvm/llvm-project/pull/96297, cc @davemgreen
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUkk-LnTAUxT9N3ISReBOfZuHCmVeH0hkoFLpPzNWXTkwkiVOmn77o_HlQSqErwST33N85R6VkZ4_YkfqW1OdCbfkSYuftkx0LHcxL9xUjveS8JsJ7AgOBYbb5sulyDAuBIW4p3zjlZwLDGJbVOow3erMuW58IDOvmHIGhOTECd_Th4fsjBUbVuqKKieZANdLFpten1s90WnPYbJlULi2HcqqgpcHTvo_j5STozwt6eu-CVu7zN3TUJrolNCVhPWF9nxIu2r3QKcRXsUpS5c27MOH9HzDOPS_lHIwOLpch7hi_CAyefxGPn-6b-Dr3wT6he6ERncpo9rX_Yck-8u1zs8bwA8d8NUKeQDa7FeNIiWBGPeMyR0RfmI4byaUqsKsaLmVTi7otLh0K1rBpkkYLbdpTWxmm9aQrITkbp0oWtgMGNYNKVoIzIcu2rRWfJGPSSMbVSATDRVlXHrAhzoVNacOugqZlonBKo0tHAwC0Gp_QG8L7N8cJAIE7AvCRkso2-I_fBy3v5yMSm9DtJ_W5iN1hgN7mRARzNuV01c82u6Nz7yL1mdS311hJfabH5b-14WMRLLbouv9O4oDfu_nG_9zB7wAAAP__VYL1bg">