Open llvmbot opened 9 years ago
This has been fixed, though by what I couldn't find.
The attached test.cpp file using function pointers with types the ACLE expects compiles without error with trunk clang.
(types from here) https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=vcls
$ ./clang -target aarch64-arm-none-eabi -march=armv8-a+simd -c -o /dev/null /tmp/test.cpp
Extended Description
The ARM C Language Extensions document (ACLE) specifies that the second (index) parameter to the vtbl and vtbx family of functions should be unsigned, even when the other parameters are signed:
Aarch32: T vtblN_ST(TxN a, UT b); T vtbxN_ST(T a, TxN b, UT c);
Aarch64: T vqtblNQ_ST (T2xN t, UT idx); T vqtbxNQ_ST (T a, T2xN t, UT idx);
E.g., int8x8_t vqtbl1_s8 (int8x16_t a, uint8x8_t b)
Clang declares them to be signed, instead.
GCC has had these correct for Aarch64 since GCC 4.9, though for ARM (Aarch32) it still has the second value signed.