1 // RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | FileCheck %s
2 // REQUIRES: aarch64-registered-target
3 /// Test vqmov[u]n_high_<su>{16,32,64) ARM64 intrinsics
4 
5 #include <arm_neon.h>
6 
7 // vqmovn_high_s16 -> UQXTN2 Vd.16b,Vn.8h
test_vqmovn_high_s16(int8x8_t Vdlow,int16x8_t Vn)8 int8x16_t test_vqmovn_high_s16(int8x8_t Vdlow, int16x8_t Vn)
9 {
10     return vqmovn_high_s16(Vdlow, Vn);
11   // CHECK: test_vqmovn_high_s16:
12   // CHECK: sqxtn2.16b {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
13 }
14 
15 // vqmovun_high_s16 -> UQXTN2 Vd.16b,Vn.8h
test_vqmovun_high_s16(uint8x8_t Vdlow,uint16x8_t Vn)16 uint8x16_t test_vqmovun_high_s16(uint8x8_t Vdlow, uint16x8_t Vn)
17 {
18     return vqmovun_high_s16(Vdlow, Vn);
19   // CHECK: test_vqmovun_high_s16:
20   // CHECK: sqxtun2.16b {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
21 }
22 
23 // vqmovn_high_s32 -> SQXTN2 Vd.8h,Vn.4s
test_vqmovn_high_s32(int16x4_t Vdlow,int32x4_t Vn)24 int16x8_t test_vqmovn_high_s32(int16x4_t Vdlow, int32x4_t Vn)
25 {
26     return vqmovn_high_s32(Vdlow, Vn);
27   // CHECK: test_vqmovn_high_s32:
28   // CHECK: sqxtn2.8h {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
29 }
30 
31 // vqmovn_high_u32 -> UQXTN2 Vd.8h,Vn.4s
test_vqmovn_high_u32(uint16x4_t Vdlow,uint32x4_t Vn)32 uint16x8_t test_vqmovn_high_u32(uint16x4_t Vdlow, uint32x4_t Vn)
33 {
34     return vqmovn_high_u32(Vdlow, Vn);
35   // CHECK: test_vqmovn_high_u32:
36   // CHECK: uqxtn2.8h {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
37 }
38 
39 // vqmovn_high_s64 -> SQXTN2 Vd.4s,Vn.2d
test_vqmovn_high_s64(int32x2_t Vdlow,int64x2_t Vn)40 int32x4_t test_vqmovn_high_s64(int32x2_t Vdlow, int64x2_t Vn)
41 {
42     return vqmovn_high_s64(Vdlow, Vn);
43   // CHECK: test_vqmovn_high_s64:
44   // CHECK: sqxtn2.4s {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
45 }
46 
47 // vqmovn_high_u64 -> UQXTN2 Vd.4s,Vn.2d
test_vqmovn_high_u64(uint32x2_t Vdlow,uint64x2_t Vn)48 uint32x4_t test_vqmovn_high_u64(uint32x2_t Vdlow, uint64x2_t Vn)
49 {
50     return vqmovn_high_u64(Vdlow, Vn);
51   // CHECK: test_vqmovn_high_u64:
52   // CHECK: uqxtn2.4s {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
53 }
54 
55 // vqmovn_high_u16 -> UQXTN2 Vd.16b,Vn.8h
test_vqmovn_high_u16(uint8x8_t Vdlow,uint16x8_t Vn)56 uint8x16_t test_vqmovn_high_u16(uint8x8_t Vdlow, uint16x8_t Vn)
57 {
58     return vqmovn_high_u16(Vdlow, Vn);
59   // CHECK: test_vqmovn_high_u16:
60   // CHECK: uqxtn2.16b {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
61 }
62 
63 // vqmovun_high_s32 -> SQXTUN2 Vd.8h,Vn.4s
test_vqmovun_high_s32(uint16x4_t Vdlow,uint32x4_t Vn)64 uint16x8_t test_vqmovun_high_s32(uint16x4_t Vdlow, uint32x4_t Vn)
65 {
66     return vqmovun_high_s32(Vdlow, Vn);
67   // CHECK: test_vqmovun_high_s32:
68   // CHECK: sqxtun2.8h {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
69 }
70 
71 // vqmovun_high_s64 -> SQXTUN2  Vd.4s,Vn.2d
test_vqmovun_high_s64(uint32x2_t Vdlow,uint64x2_t Vn)72 uint32x4_t test_vqmovun_high_s64(uint32x2_t Vdlow, uint64x2_t Vn)
73 {
74     return vqmovun_high_s64(Vdlow, Vn);
75   // CHECK: test_vqmovun_high_s64:
76   // CHECK: sqxtun2.4s {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
77 }
78