[clang] [llvm] [LLVM][VecLib] Refactor LIBMVEC integration to be target neutral. (PR #138262)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed May 7 02:34:05 PDT 2025


================
@@ -1360,8 +1360,15 @@ void TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib(
     addVectorizableFunctions(VecFuncs_DarwinLibSystemM);
     break;
   }
-  case LIBMVEC_X86: {
-    addVectorizableFunctions(VecFuncs_LIBMVEC_X86);
+  case LIBMVEC: {
+    switch (TargetTriple.getArch()) {
+    default:
+      break;
+    case llvm::Triple::x86:
+    case llvm::Triple::x86_64:
+      addVectorizableFunctions(VecFuncs_LIBMVEC_X86);
+      break;
+    }
----------------
paulwalker-arm wrote:

This PR is prep work for adding support for the AArch64 build of libmvec. We'll want this layout then anyway so I'm going to reject this suggestion.

https://github.com/llvm/llvm-project/pull/138262


More information about the llvm-commits mailing list