[llvm] [NFC] Extend InjectTLIMappings pass testing (PR #66898)

Maciej Gabka via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 07:14:11 PDT 2023


================
@@ -30,8 +29,12 @@ define double @sin_f64(double %in) {
 ; MASSV:        call double @sin(double %{{.*}}) #[[SIN:[0-9]+]]
 ; ACCELERATE:   call double @sin(double %{{.*}})
 ; LIBMVEC-X86:  call double @sin(double %{{.*}}) #[[SIN:[0-9]+]]
+; SLEEFGNUABI:  call double @sin(double %{{.*}})
+; ARMPL:        call double @sin(double %{{.*}})
 ; No mapping of "sin" to a vector function for Accelerate.
-; ACCELERATE-NOT: _ZGV_LLVM_{{.*}}_sin({{.*}})
+; ACCELERATE-NOT:  _ZGV_LLVM_{{.*}}_sin({{.*}})
----------------
mgabka wrote:

Hi Jolanta,
Your changes to the test are wrong.
The purpose of this test is to check that the  "inject-tli-mappings" pass is adding the attribute to the function call with the mappings to vector variants of the scalar call  for both ARMPL and SLEEF such mappings exists so the check lines you added aren't correct.

You should also extend the check lines at the beginning and end of this file to show that the "llvm.compiler.used" array and "vector-function-abi-variant" attribute  look like when ArmPL and sleefgnuabi are used.

Perhaps the target needs to be passed as opt argument.

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


More information about the llvm-commits mailing list