[llvm] [TLI][AArch64] Add extra SLEEF mappings and tests (PR #78140)

Maciej Gabka via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 04:52:52 PST 2024


================
@@ -2349,6 +2645,79 @@ for.cond.cleanup:
   ret void
 }
 
+declare void @sincospi(double, ptr, ptr)
+declare void @sincospif(float, ptr, ptr)
+
+define void @test_sincospi(ptr noalias %a, ptr noalias %b, ptr noalias %c) {
----------------
mgabka wrote:

> The tests for sincospi were accidentally removed in #77609. Good we are reinstating them here.

@labrinea my understanding was that those tests are checking the inject-with-tli pass in isolation what is good to check if the attributes are correctly added on few test cases, while the llvm/test/Transforms/LoopVectorize/AArch64/veclib-function-calls.ll tests are primarily testing LoopVectorizer, they also call the inject-tli-mappings pass, so we have a testing of a whole flow.

I am not fully convinced it is worth to have a 100% coverage in  llvm/test/Transforms/Util/add-TLI-mappings.ll, as that would also include all veclibs for all other targets, and intriduce quite a lot of duplicated testing.

I would rather not add extra tests there, unless we are expecting changes in the form of the **vector-function-abi-variant** or how it is emitted.
For example it had sense to addd tests for sincos as there was no tests there for functions taking linear pointers.

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


More information about the llvm-commits mailing list