aboutsummaryrefslogtreecommitdiff
path: root/clang/test
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-12-08 00:04:11 +0000
committerBill Wendling <isanbard@gmail.com>2013-12-08 00:04:11 +0000
commit1da2736eb334a54b282137067ca0e72e854e2df4 (patch)
tree0c4ecc1212701f515390027ec5c455a8da48a0c1 /clang/test
parentb1dd04df749aef76aa2129291957c10475d6859a (diff)
downloadllvm-1da2736eb334a54b282137067ca0e72e854e2df4.zip
llvm-1da2736eb334a54b282137067ca0e72e854e2df4.tar.gz
llvm-1da2736eb334a54b282137067ca0e72e854e2df4.tar.bz2
Merging r196535:
------------------------------------------------------------------------ r196535 | apazos | 2013-12-05 13:13:24 -0800 (Thu, 05 Dec 2013) | 1 line Implemented vget/vset_lane_f16 intrinsics ------------------------------------------------------------------------ llvm-svn: 196686
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/aarch64-neon-copy.c73
1 files changed, 73 insertions, 0 deletions
diff --git a/clang/test/CodeGen/aarch64-neon-copy.c b/clang/test/CodeGen/aarch64-neon-copy.c
index 077f7ce9..eb91bf9 100644
--- a/clang/test/CodeGen/aarch64-neon-copy.c
+++ b/clang/test/CodeGen/aarch64-neon-copy.c
@@ -1244,3 +1244,76 @@ float64x2_t test_vcopyq_laneq_f64(float64x2_t a, float64x2_t c) {
return vcopyq_laneq_f64(a, 1, c, 1);
}
+// CHECK: test_vget_lane_f16
+int test_vget_lane_f16(float16x4_t v1) {
+ float16_t a = vget_lane_f16(v1, 3);
+ return (int)a;
+// CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[3]
+}
+
+// CHECK: test_vgetq_lane_f16
+int test_vgetq_lane_f16(float16x8_t v1) {
+ float16_t a = vgetq_lane_f16(v1, 7);
+ return (int)a;
+// CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[7]
+}
+
+// CHECK: test_vget_lane_f16_2
+float test_vget_lane_f16_2(float16x4_t v1) {
+ float16_t a = vget_lane_f16(v1, 3);
+ return (float)a;
+// CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[3]
+}
+
+// CHECK: test_vgetq_lane_f16_2
+float test_vgetq_lane_f16_2(float16x8_t v1) {
+ float16_t a = vgetq_lane_f16(v1, 7);
+ return (float)a;
+// CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[7]
+}
+
+// CHECK: test_vset_lane_f16
+float16x4_t test_vset_lane_f16(float16x4_t v1) {
+ float16_t a;
+ return vset_lane_f16(a, v1, 3);
+// CHECK: fmov {{s[0-9]+}}, wzr
+// CHECK-NEXT: ins {{v[0-9]+}}.h[3], {{v[0-9]+}}.h[0]
+}
+
+// CHECK: test_vsetq_lane_f16
+float16x8_t test_vsetq_lane_f16(float16x8_t v1) {
+ float16_t a;
+ return vsetq_lane_f16(a, v1, 7);
+// CHECK: fmov {{s[0-9]+}}, wzr
+// CHECK-NEXT: ins {{v[0-9]+}}.h[7], {{v[0-9]+}}.h[0]
+}
+
+// CHECK: test_vset_lane_f16_2
+float16x4_t test_vset_lane_f16_2(float16x4_t v1) {
+ float16_t a = vget_lane_f16(v1, 0);
+ return vset_lane_f16(a, v1, 3);
+// CHECK: ins {{v[0-9]+}}.h[3], {{v[0-9]+}}.h[0]
+}
+
+// CHECK: test_vsetq_lane_f16_2
+float16x8_t test_vsetq_lane_f16_2(float16x8_t v1) {
+ float16_t a = vgetq_lane_f16(v1, 0);
+ return vsetq_lane_f16(a, v1, 7);
+// CHECK: ins {{v[0-9]+}}.h[7], {{v[0-9]+}}.h[0]
+}
+
+
+// CHECK: test_vsetq_lane_f16_3
+float16x8_t test_vsetq_lane_f16_3(float16x8_t v1, float b, float c) {
+ float16_t a = (float16_t)b;
+ return vsetq_lane_f16(a, v1, 7);
+// CHECK: ins {{v[0-9]+}}.h[7], {{w[0-9]+}}
+}
+
+// CHECK: test_vsetq_lane_f16_4
+float16x8_t test_vsetq_lane_f16_4(float16x8_t v1, float b, float c) {
+ float16_t a = (float16_t)b + 1.0;
+ return vsetq_lane_f16(a, v1, 7);
+// CHECK: ins {{v[0-9]+}}.h[7], {{w[0-9]+}}
+}
+