aboutsummaryrefslogtreecommitdiffstats
path: root/test/ExecutionEngine/Interpreter
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-12-01 14:51:49 -0800
committerStephen Hines <srhines@google.com>2014-12-02 16:08:10 -0800
commit37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch)
tree8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /test/ExecutionEngine/Interpreter
parentd2327b22152ced7bc46dc629fc908959e8a52d03 (diff)
downloadexternal_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip
external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz
external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'test/ExecutionEngine/Interpreter')
-rw-r--r--test/ExecutionEngine/Interpreter/intrinsics.ll35
-rw-r--r--test/ExecutionEngine/Interpreter/lit.local.cfg3
2 files changed, 38 insertions, 0 deletions
diff --git a/test/ExecutionEngine/Interpreter/intrinsics.ll b/test/ExecutionEngine/Interpreter/intrinsics.ll
new file mode 100644
index 0000000..49d0bbe
--- /dev/null
+++ b/test/ExecutionEngine/Interpreter/intrinsics.ll
@@ -0,0 +1,35 @@
+; RUN: lli -O0 -force-interpreter < %s
+
+; libffi does not support fp128 so we don’t test it
+declare float @llvm.sin.f32(float)
+declare double @llvm.sin.f64(double)
+declare float @llvm.cos.f32(float)
+declare double @llvm.cos.f64(double)
+declare float @llvm.floor.f32(float)
+declare double @llvm.floor.f64(double)
+declare float @llvm.ceil.f32(float)
+declare double @llvm.ceil.f64(double)
+declare float @llvm.trunc.f32(float)
+declare double @llvm.trunc.f64(double)
+declare float @llvm.round.f32(float)
+declare double @llvm.round.f64(double)
+declare float @llvm.copysign.f32(float, float)
+declare double @llvm.copysign.f64(double, double)
+
+define i32 @main() {
+ %sin32 = call float @llvm.sin.f32(float 0.000000e+00)
+ %sin64 = call double @llvm.sin.f64(double 0.000000e+00)
+ %cos32 = call float @llvm.cos.f32(float 0.000000e+00)
+ %cos64 = call double @llvm.cos.f64(double 0.000000e+00)
+ %floor32 = call float @llvm.floor.f32(float 0.000000e+00)
+ %floor64 = call double @llvm.floor.f64(double 0.000000e+00)
+ %ceil32 = call float @llvm.ceil.f32(float 0.000000e+00)
+ %ceil64 = call double @llvm.ceil.f64(double 0.000000e+00)
+ %trunc32 = call float @llvm.trunc.f32(float 0.000000e+00)
+ %trunc64 = call double @llvm.trunc.f64(double 0.000000e+00)
+ %round32 = call float @llvm.round.f32(float 0.000000e+00)
+ %round64 = call double @llvm.round.f64(double 0.000000e+00)
+ %copysign32 = call float @llvm.copysign.f32(float 0.000000e+00, float 0.000000e+00)
+ %copysign64 = call double @llvm.copysign.f64(double 0.000000e+00, double 0.000000e+00)
+ ret i32 0
+}
diff --git a/test/ExecutionEngine/Interpreter/lit.local.cfg b/test/ExecutionEngine/Interpreter/lit.local.cfg
new file mode 100644
index 0000000..8cbaf03
--- /dev/null
+++ b/test/ExecutionEngine/Interpreter/lit.local.cfg
@@ -0,0 +1,3 @@
+# These tests require foreign function calls
+if config.enable_ffi != "ON":
+ config.unsupported = True