[clang] [llvm] [AArch64][VecLib] Add libmvec support for AArch64 targets (PR #143696)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 11 08:59:55 PDT 2025
================
@@ -1299,6 +1299,30 @@ static const VecDesc VecFuncs_LIBMVEC_X86[] = {
#undef TLI_DEFINE_LIBMVEC_X86_VECFUNCS
};
+static const VecDesc VecFuncs_LIBMVEC_AARCH64_VF2[] = {
+#define TLI_DEFINE_LIBMVEC_AARCH64_VF2_VECFUNCS
+#define TLI_DEFINE_VECFUNC(SCAL, VEC, VABI_PREFIX) \
+ {SCAL, VEC, /* VF = */ FIXED(2), /* MASK = */ false, VABI_PREFIX, \
+ /* CC = */ CallingConv::AArch64_VectorCall},
+#include "llvm/Analysis/VecFuncs.def"
+#undef TLI_DEFINE_LIBMVEC_AARCH64_VF2_VECFUNCS
+};
+static const VecDesc VecFuncs_LIBMVEC_AARCH64_VF4[] = {
+#define TLI_DEFINE_LIBMVEC_AARCH64_VF4_VECFUNCS
+#define TLI_DEFINE_VECFUNC(SCAL, VEC, VABI_PREFIX) \
+ {SCAL, VEC, /* VF = */ FIXED(4), /* MASK = */ false, VABI_PREFIX, \
+ /* CC = */ CallingConv::AArch64_VectorCall},
+#include "llvm/Analysis/VecFuncs.def"
+#undef TLI_DEFINE_LIBMVEC_AARCH64_VF4_VECFUNCS
+};
+static const VecDesc VecFuncs_LIBMVEC_AARCH64_VFScalable[] = {
+#define TLI_DEFINE_LIBMVEC_AARCH64_SCALABLE_VECFUNCS
+#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MASK, VABI_PREFIX) \
+ {SCAL, VEC, VF, MASK, VABI_PREFIX, /* CC = */ std::nullopt},
----------------
paulwalker-arm wrote:
All the SVE functions are masked so you could just pass in `/* MASK = */ true`.
https://github.com/llvm/llvm-project/pull/143696
More information about the llvm-commits
mailing list