summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic/intrinsics.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-04-30 04:41:27 +0000
committerChris Lattner <sabre@nondot.org>2005-04-30 04:41:27 +0000
commitac766dca8229d927fb569497b43bc4efd6afcd4a (patch)
treee4ac33e2a594bcc64267ba2ee4738182553b5205 /test/CodeGen/Generic/intrinsics.ll
parent08cae7f519363000928004239fdd56a4ead0a4ca (diff)
downloadllvm-ac766dca8229d927fb569497b43bc4efd6afcd4a.tar.gz
llvm-ac766dca8229d927fb569497b43bc4efd6afcd4a.tar.bz2
llvm-ac766dca8229d927fb569497b43bc4efd6afcd4a.tar.xz
add sin/cos tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic/intrinsics.ll')
-rw-r--r--test/CodeGen/Generic/intrinsics.ll24
1 files changed, 21 insertions, 3 deletions
diff --git a/test/CodeGen/Generic/intrinsics.ll b/test/CodeGen/Generic/intrinsics.ll
index ae0f3f7055..f8a64f7cba 100644
--- a/test/CodeGen/Generic/intrinsics.ll
+++ b/test/CodeGen/Generic/intrinsics.ll
@@ -1,13 +1,31 @@
; RUN: llvm-as < %s | llc
-
+;; SQRT
declare float %llvm.sqrt(float)
declare double %llvm.sqrt(double)
-
-
double %test_sqrt(float %F) {
%G = call float %llvm.sqrt(float %F)
%H = cast float %G to double
%I = call double %llvm.sqrt(double %H)
ret double %I
}
+
+; SIN
+declare float %sinf(float)
+declare double %sin(double)
+double %test_sin(float %F) {
+ %G = call float %sinf(float %F)
+ %H = cast float %G to double
+ %I = call double %sin(double %H)
+ ret double %I
+}
+
+; COS
+declare float %cosf(float)
+declare double %cos(double)
+double %test_cos(float %F) {
+ %G = call float %cosf(float %F)
+ %H = cast float %G to double
+ %I = call double %cos(double %H)
+ ret double %I
+}