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

    <tr>
        <th>Summary</th>
        <td>
            [aarch64] should avoid the sel instrunction compare to gcc
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            SVE
      </td>
    </tr>

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

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

<pre>
    * case, https://godbolt.org/z/v3cj6oK1d
```
int check (char *mask, float *result, int n) {
    int count = 0;
    for (int i=0; i<n; i++) {
        if (mask[i] == 0 && result[i] != 2.0)
          count++;
    }
    return count;
}
```
we'll see that the gcc version doesn't have extra **sel** instruction to update the **P register**, which seems high effective?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdk8GSnCAQhp8GL1SmEGdwPHiY2clecklVqnJHaIVdRqYA3SRPnwZnspu1WqTp9ufzVwevf_eEn6iSEQh_oialWyTNifBnjMnrwbu082HC7A-ea6NehP9Wa8IuhJ2IYPcoqZ0TVQbUKyX8qIwMeD1dZXzN0qPzMuWFAHFxKS_l_pnwjpL2vClQPIqKX3AkzYUy0nyojT5rHnOLxWou5snTvE34ucQnwSI65vsKy-FsyeGSxYs-rgsMesd6VHmdq3zHUO5_KbrR3Tf7SEfay3sSIC1hvvc-uv51fHLuDd1vnaMRgCaDPiUDdFKKrhCi9TPVHiJa1SZq5AoUfqUgs5kYEdw2QediCotK-Ybk6XLTMkGR2hq-I9RkY4Kw5fkdvBmrTN73Gqmxk6EwjoASK5DmuYK-FqKta1aLrtJ9o7umk1WyyUGPVkkZlBH7bFg0fnGaytVbXbZErDvQvBEpf73JAJkMn6xagus_fW42mWXYYR8mzq2Py5db8C_IhKmNcYGIk8NRdKwyfaNaJBoaPigmuOC6HoeBDwe1Zy2HFionB3AxwxLOf_z8iiPiVrbnjPOaNYwJ1vFux0WNTwd6z7nQg27InsFVWrfLBPkPqEJfYIZlilh06GN8L8oY7TRDcSXryyUZH_p11ONYFeq-IP8FarUBDQ">