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

    <tr>
        <th>Summary</th>
        <td>
            AARCH64 big endian accuracy problem of float complex division
        </td>
    </tr>

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

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

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

<pre>
    Hello, I’m tring to use llvm AARCH64 big endian target toolchain to compile float complex division demo, I find a problem that AARCH64 big endian target is error, AARCH64 little endian target is ok. I wrote like this:
LLVM VERSION: 15.0.1
Demo:

```
 #include <complex>
 #include <cmath>
 #include <cstdlib>
 #include <iostream>

 typedef float A;

 int main(){
    std::complex<A> x (30.0, 40.0);
    std::complex<A> y (40.0, 40.0);

    std::complex<A> res = x / y;

    std::cout << res  << std::endl;
 }
```
compilation command:
**AARCH64 big endian target:**
clang++ **-O1** demo.c
result: (0.0273438,0.00390625)
clang++ **-O0** demo.c
result: (0.875,0.125)
clang++ **-O1 -fno-inline** demo.c
result: (0.875,0.125)

**AARCH64 little endian target:**
clang++ -O1 demo.c
result: (0.875,0.125)

double complex division is ok in AARCH64 big endian target toolchain
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVF-PmzgQ_zTDyyjI2ITAAw_ZZKOu1GulntR3AwP4auzINm1zn_5kks3q1CRbVUIB8vsz48H-Se_VYIhqWD_Bep_IOYzW1Z9I6X9HaYagpBmlTRrbneoPpLUFvsMXeOZQMqiqCYNTZsBgcfaEWn-fcLv9svtQ5NioAcl0ShoM0g0UMFir21EqE_mtnY5KE_bayrC8afqJnfquvLIGO5rOtbBXpkOJR2cbTROGUYYHNZRHcs66qH1laRWCpl-J9luKL_jD2UCo1TfCMCoPYgtsD2z78ePXv_Dr85e_Xz5_ArHFbJ2yNDtj-9jdK_HyW7DLtbwicKFMq-eOEMTusj4Qz7fhSYbxLuhDp1VzD1bWB0dyuuIXVjgdqaP-MuAtiKf_wcoEnKQywEvgFWwuKCKiD11cnNheu95tQTzjTwReCpayONx8uVdX20fCUxTmd4Tvyx15BLFf6h_w9Fg5hzgUELtF9vp8JZDp9FvPsNnf_HrnzSlD3ImtnSZpurfPzeN1dwdG3sK4OGlpBuBPwJ_w_P_qc3Z-WPZ42p55jvysoziOiqWMb0QuSuA7ljImKlbwdRzaXU_2vme5WS9-2TtWGa56Y1fKaGXoz2xvTerWKXwwrNjHH1Xt7Nxo-jVRlgOPyvxOQCVdLbpKVDKhOiuqrKoKwUUy1oWQDevzlpWVzGXfrqnZ5Ju-KtdZL2S7SVTNGReszHJWrMtcpFVXUi6agvq86MuMQ85okkqnMSxT64ZEeT9TXeRFsUm0bEj7JY45N_QDFxA4j-ns6qhZNfPgIWda-eDfXIIKmuoba5NtOzvZnq4Javs7oZvMTtdjCMclBPkB-GFQYZybtLUT8EOsdbmtjs7-Q20Aflg69MAPywr-CwAA___DPNHS">