Add a test for llvm.sqrt
authorChris Lattner <sabre@nondot.org>
Sat, 30 Apr 2005 04:07:15 +0000 (04:07 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 30 Apr 2005 04:07:15 +0000 (04:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21628 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Generic/intrinsics.ll [new file with mode: 0644]

diff --git a/test/CodeGen/Generic/intrinsics.ll b/test/CodeGen/Generic/intrinsics.ll
new file mode 100644 (file)
index 0000000..ae0f3f7
--- /dev/null
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s | llc
+
+
+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
+}