Open llvmbot opened 7 years ago
It'd be helpful to have a pre-processed (-E) file attached, as not every developer installs an aarch64 c++ toolchain (standard library, libc, etc).
https://en.wikipedia.org/wiki/Black_hole_information_paradox#Postulated_solutions
Information is irretrievably lost
I am pretty sure this one can be closed in current clang.
@jan-wassenberg
Nice :) FYI we are still required to avoid arrays of vectors for SVE and RVV because their vectors are sizeless.
Extended Description
At least with the LLVM 5.0 toolchain in Android NDK r15c (in fact with each recent NDK LLVM I've tried), when compiling to Aarch64, C++ NEON intrinsics code that uses arrays of NEON variables, like
is slow; rewriting this code to declare separate variables instead of an array makes it much faster, e.g.
I learned that trick from Jan Wassenberg (CC'd). It seems very surprising that this would make any difference at all.
Attaching a self-contained testcase. It's not a minimal testcase, but it allows to quantify the impact of this bug on concrete production code (https://github.com/google/gemmlowp/blob/master/standalone/neon-gemm-kernel-benchmark.cc), and it should be trivial to extract a minimal testcase looking like the above snippets from it, or write one from scratch.
Example compilation command line:
aarch64-linux-android-clang++ -fPIE -static --std=c++11 -O3 simd-testcase.cc -o /tmp/x
Example outputs:
Pixel2 big cores, ARM Cortex-A73:
Pixel2 little cores, ARM Cortex-A53: