summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/XCore/sqrt.ll
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
committered <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
commit3277b69d734b9c90b44ebde4ede005717e2c3b2e (patch)
tree64ba909838c23261cace781ece27d106134ea451 /test/CodeGen/XCore/sqrt.ll
downloadFreeBSD-src-3277b69d734b9c90b44ebde4ede005717e2c3b2e.zip
FreeBSD-src-3277b69d734b9c90b44ebde4ede005717e2c3b2e.tar.gz
Import LLVM, at r72732.
Diffstat (limited to 'test/CodeGen/XCore/sqrt.ll')
-rw-r--r--test/CodeGen/XCore/sqrt.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/sqrt.ll b/test/CodeGen/XCore/sqrt.ll
new file mode 100644
index 0000000..221d1ac
--- /dev/null
+++ b/test/CodeGen/XCore/sqrt.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | llc -march=xcore > %t1.s
+; RUN: grep "bl sqrtf" %t1.s | count 1
+; RUN: grep "bl sqrt" %t1.s | count 2
+declare double @llvm.sqrt.f64(double)
+
+define double @test(double %F) {
+ %result = call double @llvm.sqrt.f64(double %F)
+ ret double %result
+}
+
+declare float @llvm.sqrt.f32(float)
+
+define float @testf(float %F) {
+ %result = call float @llvm.sqrt.f32(float %F)
+ ret float %result
+}
OpenPOWER on IntegriCloud