llvm-project/clang/test/CodeGen/arm-mve-intrinsics
Simon Tatham 98ea4b30c2 [ARM,MVE] Make the MVE intrinsics work in C++!
Summary:
Apparently nobody has tried this in months of development. It turns
out that `FunctionDecl::getBuiltinID` will never consider a function
to be a builtin if it is in C++ and not extern "C". So none of the
function declarations in <arm_mve.h> are recognized as builtins when
clang is compiling in C++ mode: it just emits calls to them as
ordinary functions, which then turn out not to exist at link time.

The trivial fix is to wrap most of arm_mve.h in an extern "C".

Added a test in clang/test/CodeGen/arm-mve-intrinsics which checks
basic functioning of the MVE header file in C++ mode. I've filled it
with copies of existing test functions from other files in that
directory, including a few moderately tricky cases of overloading (in
particular one that relies on the strict-polymorphism attribute added
in D72518).

(I considered making //every// test in that directory compile in both
C and C++ mode and check the code generation was identical. But I
think that would increase testing time by more than the value it adds,
and also update_cc_test_checks gets confused when the output function
name varies between RUN lines.)

Reviewers: LukeGeeson, MarkMurrayARM, miyuki, dmgreen

Reviewed By: MarkMurrayARM

Subscribers: kristof.beyls, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73268
2020-01-23 14:10:27 +00:00
..
admin.c [ARM,MVE] Add intrinsics for 'administrative' vector operations. 2019-11-15 09:53:43 +00:00
bitwise-imm.c [ARM,MVE] Support immediate vbicq,vorrq,vmvnq intrinsics. 2020-01-23 11:53:52 +00:00
compare.c [ARM,MVE] Add intrinsics for vector comparisons. 2019-11-18 10:39:30 +00:00
cplusplus.cpp [ARM,MVE] Make the MVE intrinsics work in C++! 2020-01-23 14:10:27 +00:00
get-set-lane.c [ARM,MVE] Add intrinsics for vector get/set lane. 2019-11-15 09:53:58 +00:00
load-store.c [ARM,MVE] Add intrinsics for vector get/set lane. 2019-11-15 09:53:58 +00:00
predicates.c [ARM,MVE] Add intrinsics to deal with predicates. 2019-12-02 16:20:30 +00:00
scalar-shifts.c [ARM,MVE] Add intrinsics for scalar shifts. 2019-11-19 14:47:29 +00:00
scatter-gather.c [ARM,MVE] Support -ve offsets in gather-load intrinsics. 2020-01-06 16:33:07 +00:00
vabavq.c [ARM][MVE] Add vector reduction intrinsics with two vector operands 2019-12-13 13:17:29 +00:00
vabdq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vadc.c [ARM,MVE] Add intrinsics for vector get/set lane. 2019-11-15 09:53:58 +00:00
vaddq.c [ARM][MVE][Intrinsics] Add *_x() variants of my *_m() intrinsics. 2019-12-13 11:51:23 +00:00
vandq.c [ARM][MVE][Intrinsics] Add *_x() variants of my *_m() intrinsics. 2019-12-13 11:51:23 +00:00
vbicq.c [ARM][MVE][Intrinsics] Add *_x() variants of my *_m() intrinsics. 2019-12-13 11:51:23 +00:00
vcaddq.c [ARM][MVE] Refactor complex vector intrinsics [NFCI] 2019-12-10 16:21:52 +00:00
vcmlaq.c [ARM][MVE] Add complex vector intrinsics 2019-12-09 12:05:59 +00:00
vcmulq.c [ARM][MVE] Add complex vector intrinsics 2019-12-09 12:05:59 +00:00
vcvt.c [ARM,MVE] Add intrinsics for vector get/set lane. 2019-11-15 09:53:58 +00:00
vector-shift-imm-dyadic.c [ARM,MVE] Make `vqrshrun` generate the right instruction. 2020-01-10 11:25:05 +00:00
vector-shift-imm.c [ARM][MVE] Add intrinsics for more immediate shifts. 2019-12-13 13:07:39 +00:00
vector-shift-var.c [ARM,MVE] Intrinsics for variable shift instructions. 2020-01-08 14:42:24 +00:00
veorq.c [ARM][MVE][Intrinsics] Add *_x() variants of my *_m() intrinsics. 2019-12-13 11:51:23 +00:00
vhaddq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vhcaddq.c [ARM][MVE] Refactor complex vector intrinsics [NFCI] 2019-12-10 16:21:52 +00:00
vhsubq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vld24.c [Clang] Handle target-specific builtins returning aggregates. 2020-01-09 17:28:37 +00:00
vldr.c [ARM,MVE] Add intrinsics for vector get/set lane. 2019-11-15 09:53:58 +00:00
vmaxaq.c [ARM][MVE][Intrinsics] Add VMINAQ, VMINNMAQ, VMAXAQ, VMAXNMAQ intrinsics. 2020-01-15 17:20:15 +00:00
vmaxnmaq.c [ARM][MVE][Intrinsics] Take abs() of VMINNMAQ, VMAXNMAQ intrinsics' first arguments. 2020-01-20 14:33:26 +00:00
vmaxnmq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vmaxq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vminaq.c [ARM][MVE][Intrinsics] Add VMINAQ, VMINNMAQ, VMAXAQ, VMAXNMAQ intrinsics. 2020-01-15 17:20:15 +00:00
vminnmaq.c [ARM][MVE][Intrinsics] Take abs() of VMINNMAQ, VMAXNMAQ intrinsics' first arguments. 2020-01-20 14:33:26 +00:00
vminnmq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vminq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vminvq.c [ARM,MVE] Add intrinsics for vector get/set lane. 2019-11-15 09:53:58 +00:00
vmldav.c [ARM][MVE] Add vector reduction intrinsics with two vector operands 2019-12-13 13:17:29 +00:00
vmlldav.c [ARM][MVE] Add vector reduction intrinsics with two vector operands 2019-12-13 13:17:29 +00:00
vmulhq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vmullbq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vmulltq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vmulq.c [ARM][MVE][Intrinsics] Add *_x() variants of my *_m() intrinsics. 2019-12-13 11:51:23 +00:00
vornq.c [ARM][MVE][Intrinsics] Add *_x() variants of my *_m() intrinsics. 2019-12-13 11:51:23 +00:00
vorrq.c [ARM][MVE][Intrinsics] Add *_x() variants of my *_m() intrinsics. 2019-12-13 11:51:23 +00:00
vqaddq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vqdmulhq.c [ARM][MVE][Intrinsics] All vqdmulhq/vqrdmulhq tests should be for signed numbers. 2019-12-13 17:29:59 +00:00
vqrdmulhq.c [ARM][MVE][Intrinsics] All vqdmulhq/vqrdmulhq tests should be for signed numbers. 2019-12-13 17:29:59 +00:00
vqsubq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vrhaddq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vrmulhq.c [ARM,MVE] Fix many signedness errors in MVE intrinsics. 2020-01-06 16:33:16 +00:00
vsubq.c [ARM][MVE][Intrinsics] Add *_x() variants of my *_m() intrinsics. 2019-12-13 11:51:23 +00:00