summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
diff options
context:
space:
mode:
authorDiogo N. Sampaio <diogo.sampaio@arm.com>2019-04-12 10:43:48 +0000
committerDiogo N. Sampaio <diogo.sampaio@arm.com>2019-04-12 10:43:48 +0000
commit6df76a341e7e5a407a05c0c03bbff5dd77e2960e (patch)
treed762b8428f927d13005077b25372e243c5f46b96 /test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
parent806f4c2c6b3b73b30614fd95e33aeefe9e6a0a68 (diff)
[Aarch64] Add v8.2-a half precision element extract intrinsics
Summary: Implements the intrinsics define on the ACLE to extract half precision fp scalar elements from float16x4_t and float16x8_t vector types. a.k.a: vduph_lane_f16 vduph_laneq_f16 Reviewers: pablooliveira, olista01, LukeGeeson, DavidSpickett Reviewed By: DavidSpickett Subscribers: DavidSpickett, javed.absar, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60272 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358276 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/aarch64-v8.2a-neon-intrinsics.c')
-rw-r--r--test/CodeGen/aarch64-v8.2a-neon-intrinsics.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c b/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
index a4bf875336..a84445b62a 100644
--- a/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
+++ b/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
@@ -1618,3 +1618,16 @@ float16x8_t test_vtrn2q_f16(float16x8_t a, float16x8_t b) {
return vtrn2q_f16(a, b);
}
+// CHECK-LABEL: @test_vduph_laneq_f16(
+// CHECK: [[V:%.*]] = extractelement <8 x half> [[V2:%.*]], i32 7
+// CHECK-NEXT: ret half [[V]]
+float16_t test_vduph_laneq_f16(float16x8_t vec) {
+ return vduph_laneq_f16(vec, 7);
+}
+
+// CHECK-LABEL: @test_vduph_lane_f16(
+// CHECK: [[V:%.*]] = extractelement <4 x half> [[V2:%.*]], i32 3
+// CHECK-NEXT: ret half [[V]]
+float16_t test_vduph_lane_f16(float16x4_t vec) {
+ return vduph_lane_f16(vec, 3);
+}