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

    <tr>
        <th>Summary</th>
        <td>
            [AArch64] Decompos gep of complex type struct for better codegen
        </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>
    * test: https://godbolt.org/z/rjafGexos
```
float s_ref_real[eulers_per_block][block_sz];
std::complex<float> mdlComplex[SIZE];
int indexarr[block_sz];

void foo(int sz) {
 for (int i = 0; i < eulers_per_block; i ++) {
    #pragma clang loop vectorize(enable)
    #pragma GCC ivdep
     for (int tid=0; tid < sz; tid++){
      int index = indexarr[tid];
      s_ref_real[i][tid] = mdlComplex[index].real();
    }
   }
}
```

* This is a subproblems of [PR107345](https://github.com/llvm/llvm-project/issues/107345), here we only address the **real** part of  complex type. Now llvm gets unoptimized kernel loop because DAGTypeLegalizer::SplitVectorOperand split the llvm.masked.gather.nxv4f32.nxv4p0 because there is invalid type **<vscale x 4 x i64>**.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVE2vqzYQ_TWTzaiI2BDIgkUSXq4qVW3V99RFN5HBA_hdByPbcHPz6ysMzc3tx6oSAtvjOT4z52DhnGp7ogLSI6TlRoy-M7aYGtk0m8rI9wLYAT05D_yAnfeDA34AdgZ2bo2sjPaRsS2w8x3Y2X4XzQvdjIO4hPgAu3h9wrTRRnh0F0vNxZLQkB5p1GTdZSB7qbSpXyEtIT2G4cXd5xk_LsnOy_lgfqjNddB0A34KeMC_4FXq07qaHr_--MeX50TVe1S9pJuw9j-wl_dklMTGGGD5nOPuwPYI2boHG2NxDSkEXmIM_BiGJ_xHGUuEHcPzjIKIwPhgRXsVWGvRt6iNGXCi2hur7gQsp15UmoDt_y3n5XRCNUkaPoLP1LySwMtAzSsZyLn7Onvw-UQH8dGhUNZTr-acpzYtuz_ppxbBlo0h_ZMWAQvSMgrbWT6f_YwGWfmYPMYfg8_2Wd_sgN865VA5FOjGarCm0nR1aBqE9Pjrb9s440k6E2P53wyrfDdWUW2uwM5aT399fhis-U61B3ZWzo3kgJ1XFLYHdsKOLOEboen1OwopLTmHviMENhNaqgvUBmH9zARXm6J_HyjCn80bzidhS97h2JvBq6u6k8RXsj3pxQQV1WJ0hOXh5dv7QD9RK7S6k12M_3XQyv8efPLLQFb0Et28FIjM4NFVuFeSUSt8Rzbqb1PScBa-Q_wA96GYuYH9JLSSgeFaCPDT5GqhCW-Y4A3VLgH-ZYlFG1lwued7saFim7E0z7ZZmm66gu0Yr3dyu93lLGa7XGb1Lm4kT1hDKd81G1WwmCXxPt7HebLfplGW1VUW11nT5Eld5RySmK5C6SiUYWy7CToU2zjLWbrRoiLtwhXFWE9vGKLA2Hxj2SJIWI2tgyTWynn3AeOV1-FuOxxs3e2S2aUlzdoYhy0Ns1TPSqHzdqx9-KMq8p4s1kZSS_1mtLr4X3aaK5kK9mcAAAD__7vOqNY">