Hello, I’m newer to LLVM development. 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