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

    <tr>
        <th>Summary</th>
        <td>
            aarch64: __builtin_shufflevector with a zero vector CST as the second argument and doing a "ext" like should produce ushr/shl
        </td>
    </tr>

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

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

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

<pre>
    Take:
```
#define vect64 __attribute__((vector_size(8)))

void f(vect64  unsigned short *a)
{
  *a = __builtin_shufflevector(*a,(vect64 unsigned short){0}, 2,3, 4,5);
}
```
This should just produce (for little-endian; big-endian should be shl instead):
```
        ldr     d31, [x0]
 ushr d31, d31, 32
        str     d31, [x0]
```
Right now, LLVM produces mov/ext to do this shuffle.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8Uk1vrDgQ_DXNpZWRaWCAA4f5EKfsZTfaKzK4AScePLLNJJtfv4JhFOUp7yGLtt3u6nK5pPd6mJgryI6QnSM5h9G66qon_6Zl1Fr1X_Ui3xiSA4gziAPsxTbuS0oU93pivHEX9ik2jQzB6XYO3DRABVCxZKxrvP5koKIAKrdxR1j_N6sV9tvhfYo4TysxhX60LiDQQX6V5Mf7BNd9hOSMTdPO2gQ9NX6c-97wvevKYCk9fWF_h15Q86OA_Ax0QgI6JcskBTplSy45Ppqef1TgZdR-QZqNwtfZB7w6q-aOEajorUOjQzD8xJPScoLkiK0ettWjrGX0o0E9-cBSrU1_Vhu3zyi3RpXEC1fIjh8Cso0fzn50j9QWEvoO4MMfAH5p-rcexoCTfV9OPj__-9fjhh4v9gZU80fAYFFZDHctVv139-pIVYkqk1JGXMW5yPdUkoijseqkyLK45bRoi77L81T2pcx6lqVoY8qKSFckKBUUxyKjfRrvkpbitO-KPBdtJvoSUsEXqc3OmNtlZ90Qae9nroo4KZPIyJaNX31NNPE7rkkgWmzuqqXmqZ0HD6kw2gf_hRJ0MFxJ6bpxn0Jy-J238F2HESV-srO4bZ3-eUHpMYyMnjs7KZRumC88BZSTQmX1NKBEIOKPAERo9Bs_fPBwzvKAQLUfTTQ7U40hXP1iCaqB6kGHcW53nb0A1QvnLTxdnX3lLgDV6009UL0q8X8AAAD__8_DKK0">