-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[TLI] Add mappings to SLEEF/ArmPL libcall variants taking linear args. #76060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-llvm-analysis Author: Alexandros Lamprineas (labrinea) Changes…ments. The mappings correspond to vectorized variants (fixed/scalable) for the math functions: modf, sincos, sincospi. Patch is 37.15 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/76060.diff 4 Files Affected:
|
could you also add tests for the replace-with-veclib-pass which is using those mapping to: |
llvm/test/Transforms/LoopVectorize/AArch64/vector-libcall-linear-args.ll
Outdated
Show resolved
Hide resolved
This patch prepares the ground for llvm#76060. * Unifies ArmPL and SLEEF tests for better coverage * Replaces deprecated float* and double* types with ptr * Adds noalias attribute to pointer arguments * Adds some cmd-line options to the RUN lines to simplify output * Removes datalayout since target triple is provided * Removes checks for return statements * Refactors the regex filter for autogenerated checks * Removes redundant test file suffix (already under the AArch64 dir)
This patch prepares the ground for #76060. * Unifies ArmPL and SLEEF tests for better coverage * Replaces deprecated float* and double* types with ptr * Adds noalias attribute to pointer arguments * Adds some cmd-line options to the RUN lines to simplify output * Removes datalayout since target triple is provided * Removes checks for return statements * Refactors the regex filter for autogenerated checks * Removes redundant test file suffix (already under the AArch64 dir)
I am not seeing corresponding llvm instrinsics for the veclib functions I've added. I don't think there's anything needed to be done in these test files. |
%gepc = getelementptr inbounds double, ptr %c, i64 %indvars.iv | ||
store double %data, ptr %gepc, align 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without a store we are not using the return value of the call. I see no harm here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I just pointed it out as it could simplify the test.
llvm/test/Transforms/LoopVectorize/AArch64/vector-libcall-linear-args.ll
Outdated
Show resolved
Hide resolved
When creating a declaration for a vector variant, in order to determine the argument types we need to consult the VFABI demangler. This will allow us to add TLI mappings with linear arguments (see llvm#76060).
When creating a declaration for a vector variant, in order to determine the argument types we need to consult the VFABI demangler. This will allow us to add TLI mappings with linear arguments (see #76060).
The mappings correspond to vectorized variants (fixed/scalable) for the math functions: modf, sincos, sincospi.
d77ca23
to
db47426
Compare
The mappings correspond to vectorized variants (fixed/scalable) for the math functions: modf, sincos, sincospi.