aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorFarzon Lotfi <1802579+farzonl@users.noreply.github.com>2024-06-27 12:15:13 -0700
committerGitHub <noreply@github.com>2024-06-27 15:15:13 -0400
commit918313d17d38d8723d5d81fef008538677abf9cc (patch)
treee55581ef9bf218bd8a62674c3c48cfebbc46932a /llvm/lib/Analysis/ValueTracking.cpp
parentaa8409fdca5e738c30a4ab70a3dc809bb4e9160d (diff)
downloadllvm-918313d17d38d8723d5d81fef008538677abf9cc.zip
llvm-918313d17d38d8723d5d81fef008538677abf9cc.tar.gz
llvm-918313d17d38d8723d5d81fef008538677abf9cc.tar.bz2
[SLPVectorizer] Support SLPVectorizer cases of tan across all backends (#95517)
This PR is intended to address the limited SLPVectorizer support of tan raised in the comments of this PR: https://github.com/llvm/llvm-project/pull/94559. Right now emitting the tan intrinsisic allows you to vectorize tan, but emitting the libfunc does not. to address this the libcall needs to be mapped to the intrinsic. and the libcall and function name need to be marked approriately so they can be optimized or defined as a call lowering.
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index d0d9caa..44ac0db 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -3994,6 +3994,10 @@ Intrinsic::ID llvm::getIntrinsicForCallSite(const CallBase &CB,
case LibFunc_cosf:
case LibFunc_cosl:
return Intrinsic::cos;
+ case LibFunc_tan:
+ case LibFunc_tanf:
+ case LibFunc_tanl:
+ return Intrinsic::tan;
case LibFunc_exp:
case LibFunc_expf:
case LibFunc_expl: