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