summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Analysis/TargetLibraryInfo.cpp3
-rw-r--r--llvm/test/Transforms/InstCombine/pr28143.ll12
2 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index 789b0396e0b..f70b438a06b 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -897,6 +897,9 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
case LibFunc::cos:
case LibFunc::cosf:
case LibFunc::cosl:
+ case LibFunc::tan:
+ case LibFunc::tanf:
+ case LibFunc::tanl:
case LibFunc::exp:
case LibFunc::expf:
case LibFunc::expl:
diff --git a/llvm/test/Transforms/InstCombine/pr28143.ll b/llvm/test/Transforms/InstCombine/pr28143.ll
new file mode 100644
index 00000000000..9ef273e5ed4
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/pr28143.ll
@@ -0,0 +1,12 @@
+; RUN: opt -S -instcombine < %s | FileCheck %s
+
+define void @test1() {
+entry:
+ call void @tan()
+ ret void
+}
+; CHECK-LABEL: define void @test1(
+; CHECK: call void @tan()
+; CHECK-NEXT: ret void
+
+declare void @tan()
OpenPOWER on IntegriCloud