Open
Description
I tried to check the assembly output for loongarch for my sha512 algorithms:
My GCC being here:
https://github.com/trcrsired/gcc-releases/releases
My LLVM builds being here.
https://github.com/trcrsired/llvm-releases/releases
clang++ -S sha512.cc -I../../include -std=c++26 -o sha512_loongarch64_clang.s --target=loongarch64-linux-gnu -O3 --sysroot=$HOME/toolchains/x86_64-generic-linux-gnu/loongarch64-linux-gnu
https://github.com/cppfastio/fast_io/blob/next/benchmark/0012.isa/sha512_loongarch64_clang.s
clang++ -S sha512.cc -I../../include -std=c++26 -o sha512_loongarch64_clang.s --target=loongarch64-linux-gnu -O3 --sysroot=$HOME/toolchains/x86_64-generic-linux-gnu/loongarch64-linux-gnu -msimd=none
https://github.com/cppfastio/fast_io/blob/next/benchmark/0012.isa/sha512_loongarch64_clang_nosimd.s
The simd optimizer for the loongarch backend seems too aggressive, while this issue does not exist for aarch64 or x86_64 with APX.