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

    <tr>
        <th>Summary</th>
        <td>
            Missed FCCMP opportunity
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:AArch64,
            missed-optimization
      </td>
    </tr>

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

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

<pre>
    The code

```
bool foo2 (float a, float b)
{
  return __builtin_isnan (a) && __builtin_isnan (b);
}

```
with LLVM -O2 produces

```
foo2(float, float):                              // @foo2(float, float)
        fcmp    s0, s0
        cset    w8, vs
 fcmp    s1, s1
        cset    w9, vs
        and     w0, w8, w9
        ret
```

but GCC can produce:

```
foo2(float, float):
        fcmp    s1, s1
 fccmp   s0, s0, 0, vs
        cset    w0, vs
 ret
```



https://godbolt.org/z/MMrfnKTjY
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycU0FvozwQ_TXDxUpkBnDCgUNKxHf4Gu1KW620p8o2JrhrMLJNo_bXryC03VRNDmtFHofhvXnvWXDv9bFXqoDsDrJ9xMfQWlf84N2DEsInSSRs_VI8tIpIWyuge6C7ZWd0-c1_hbWGNNYiAdw2xvJAOGBJzkcBmC-wzd35QIhTYXQ9eXwUozZB94_a97yf8BwwJ4AMkH3VntmSuzfC_Q1ZJx1acn__80BW35AMztajVP4GYLLw5uBd_zxvR24uwAqwIpDSqxSL7_NqZDdM1dPpHU8vu9KrMNXTduo-L4o_QPEMiq-A8gvQsnhfz_U0DzwTnz6Jcip8mcpyx2Mg_5Ulkbx_ixKS3b-FeSWMS1-NPD9_zwhLQr_y9u78snvbzt97G8LgJ1nzLR5tLawJa-uOgNUrYHU4uKb__-HpV1QXSZ0nOY9UEbMNy9gmzZKoLSRuGqW2schrtqEikXXS5IhcKJYiT2mkC6SYUIxZvIlplqzTuFEiZQ1lcYZbxiClquParI157qbZkfZ-VAWj2ziPDBfK-PlDRRRc_lZ9Dclut3OyZSkgApaA2GnvVb2yQ9CdfuVB237qZfvIFRPvSoxHDyk12gf_MSnoYFRxmMGkKsvDd2KHwbow9jq8RKMzxaeIdGhHsZa2A6wmmqWsBmeflAyA1azeA1azgT8BAAD__xvqMlQ">