[PATCH] D154508: [TLI][AArch64] Add mappings to vectorized functions from ArmPL

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 03:11:20 PDT 2023


paulwalker-arm added inline comments.


================
Comment at: clang/include/clang/Basic/CodeGenOptions.h:65
+    Darwin_libsystem_m, // Use Darwin's libsytem_m vector functions.
+    ArmPL               // Arm vector math library.
   };
----------------
This should be "Arm Performance Libraries".


================
Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:100
+    SLEEFGNUABI, // SLEEF - SIMD Library for Evaluating Elementary Functions.
+    ArmPL        // Arm vector math library.
   };
----------------
This should be "Arm Performance Libraries".


================
Comment at: llvm/include/llvm/Analysis/VecFuncs.def:732-739
+TLI_DEFINE_VECFUNC("cos", "armpl_vcosq_f64", FIXED(2), NOMASK)
+TLI_DEFINE_VECFUNC("llvm.cos.f64", "armpl_vcosq_f64", FIXED(2), NOMASK)
+TLI_DEFINE_VECFUNC("cosf", "armpl_vcosq_f32", FIXED(4), NOMASK)
+TLI_DEFINE_VECFUNC("llvm.cos.f32", "armpl_vcosq_f32", FIXED(4), NOMASK)
+TLI_DEFINE_VECFUNC("cos", "armpl_svcos_f64_x",  SCALABLE(2), MASKED)
+TLI_DEFINE_VECFUNC("cosf", "armpl_svcos_f32_x", SCALABLE(4), MASKED)
+TLI_DEFINE_VECFUNC("llvm.cos.f64", "armpl_svcos_f64_x", SCALABLE(2), MASKED)
----------------
Up to you but I think it is cleaner to have cos and llvm.cos within separate blocks.


================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:38
+               clEnumValN(TargetLibraryInfoImpl::ArmPL, "ArmPL",
+                          "Arm vector math library")));
 
----------------
This should be "Arm Performance Libraries".


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154508/new/

https://reviews.llvm.org/D154508



More information about the llvm-commits mailing list