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

    <tr>
        <th>Summary</th>
        <td>
            [AArch64] llvm has more   add intructions to update the array index
        </td>
    </tr>

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

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

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

<pre>
    * https://gcc.godbolt.org/z/8rcKrrr33
 ``
#include <complex.h>
#include <math.h>
using namespace std;

void cmul2 (complex<double>  * __restrict a,
 complex<double>  * __restrict b,
            complex<double>  * __restrict c) {
  for (int i=0; i<1000; i++) {
     c[i] = a[i] * b[i];
 }
}`
```

* gcc:
```
cmul2(std::complex<double>*, std::complex<double>*, std::complex<double>*):
        mov     x3, 16000
        add     x3, x2, x3
.L2:
        ld2     {v30.2d - v31.2d}, [x0], 32
        ld2     {v28.2d - v29.2d}, [x1], 32
 fmul    v27.2d, v31.2d, v28.2d
        fmul    v26.2d, v30.2d, v28.2d
 fmla    v27.2d, v30.2d, v29.2d
        fmls    v26.2d, v29.2d, v31.2d
        st2     {v26.2d - v27.2d}, [x2], 32
        cmp     x3, x2
        bne     .L2
 ret
```
*llvm:
```
cmul2(std::complex<double>*, std::complex<double>*, std::complex<double>*):           // @cmul2(std::complex<double>*, std::complex<double>*, std::complex<double>*)
        mov     x8, #-16000                     // =0xffffffffffffc180
        mov     w9, #16000                      // =0x3e80
.LBB0_1:                                // =>This Inner Loop Header: Depth=1
        add     x10, x0, x8
        add     x11, x1, x8
        add     x10, x10, x9
        add     x11, x11, x9
 ld2     { v0.2d, v1.2d }, [x10]
        ld2     { v2.2d, v3.2d }, [x11]
        add     x10, x2, x8
        add     x10, x10, x9
 adds    x8, x8, #32
        fmul    v4.2d, v2.2d, v0.2d
        fmul v5.2d, v2.2d, v1.2d
        fmls    v4.2d, v3.2d, v1.2d
        fmla v5.2d, v3.2d, v0.2d
        st2     { v4.2d, v5.2d }, [x10]
 b.ne    .LBB0_1
        ret
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVs2OozgXfZqbjVXIXBMCiyxIqOj7NLWcfclgExjxE9mGTs_Tj-wQAinS3RqNRoMQtuVzD_fPR-ZaV-dWyj1sD7BNN7w3Zaf2QyGKYpN14vseMCGlMRcNLAE8AZ7Oee6dO5F1tfE6dQY8_Ql4ilT-m1KKMaAp0IRASO3rFoCsavO6F5IAO-Zdc6nl1SuBva_tN9yUs81eV-2ZtLyR-sJzSbQRwA6jofsOXSVI3vQ1EsBopAd2FF2f1RLYOyE2is9PJbVRVW4IBzyOfv4KPHvAZ8-vWOaAMYHd4W5ddMr6WLWGVMBSCuxgJ0ef0nGOB_curOzPYHuoYJsSYCnh0wITko2LKSkEdumYnl36qMGtHtNyTHxCznluS7sGcjkFjFzKE2DJSsiACeCR_BOQePLjnuKmG9x4ZZbAD22WFgAuxAxwRfcdW9D7wC-EtUA3wu4wMOqhIG9kYL6HwuYKjwS2hyu12cQjYfjaGKPRGOOlsf9sXDR9ba0G3FkkHu8_tDNHs_zLAx9OeLqGL5qaPxM_gPEKca2fiG-oh0sLvDazcMN7uLtluPgiV3lzWRZmsZu10o22RLcNJc16n2JS10PzH-rQmQLc9JBAQP91P9aPSeTKguzNHRWy9tx9Zim9FrMn9yO6zvotHllfky5YmbwzeR-HA_30l0n7iT2w99_LSpP_t61U5KPrLuR_kgupLEsqL6YElvovVMCnrttu3-gVyHfb_o9BN45xiH9C5S9QM50gw3Qi7QEjc6FwMvNKYMiA09F8NvS_GD67jX8jNi6EfjTR1ErPB3uSp2ASkfuErmvZsP2C_Co2kzgF87Bfg_mMlr12YKZhM-rtD0qReTdtuvfugu6rSm3EnomYxXwj9_6ORtE2jINoU-55kVEuRRiGIuY8CIIoyoIiDDPM4jgQ0abaI8WAIm59ijGNPCxiDCNOZehH0S6LIaCy4VXtWQG0N61NpXUv9xHGfripeSZr7e5tiK38RtwmoBXkjdpbm7esP2sIaF1pox8spjK1u_AlicrLMLAXCbtJSq5J0yk59krVGtXnpupaTUxH-ovgRhJTSsKV4t9J1Qp53fSq3j_dDytT9pmXdw3gyYn3bXi7qO4PmRvAk_NV21ujjeWvAAAA___Kg64T">