1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -ffreestanding -emit-llvm -o - -O1 %s | FileCheck %s
2*0a6a1f1dSLionel Sambuc #include <arm_neon.h>
3*0a6a1f1dSLionel Sambuc 
test_vqshl_n_s8(int8x8_t in)4*0a6a1f1dSLionel Sambuc int8x8_t test_vqshl_n_s8(int8x8_t in) {
5*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshl_n_s8
6*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i8> @llvm.aarch64.neon.sqshl.v8i8(<8 x i8> %in, <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
7*0a6a1f1dSLionel Sambuc   return vqshl_n_s8(in, 1);
8*0a6a1f1dSLionel Sambuc }
9*0a6a1f1dSLionel Sambuc 
test_vqshl_n_s16(int16x4_t in)10*0a6a1f1dSLionel Sambuc int16x4_t test_vqshl_n_s16(int16x4_t in) {
11*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshl_n_s16
12*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i16> @llvm.aarch64.neon.sqshl.v4i16(<4 x i16> %in, <4 x i16> <i16 1, i16 1, i16 1, i16 1>)
13*0a6a1f1dSLionel Sambuc   return vqshl_n_s16(in, 1);
14*0a6a1f1dSLionel Sambuc }
15*0a6a1f1dSLionel Sambuc 
test_vqshl_n_s32(int32x2_t in)16*0a6a1f1dSLionel Sambuc int32x2_t test_vqshl_n_s32(int32x2_t in) {
17*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshl_n_s32
18*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i32> @llvm.aarch64.neon.sqshl.v2i32(<2 x i32> %in, <2 x i32> <i32 1, i32 1>)
19*0a6a1f1dSLionel Sambuc   return vqshl_n_s32(in, 1);
20*0a6a1f1dSLionel Sambuc }
21*0a6a1f1dSLionel Sambuc 
test_vqshl_n_s64(int64x1_t in)22*0a6a1f1dSLionel Sambuc int64x1_t test_vqshl_n_s64(int64x1_t in) {
23*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshl_n_s64
24*0a6a1f1dSLionel Sambuc   // CHECK: call <1 x i64> @llvm.aarch64.neon.sqshl.v1i64(<1 x i64> %in, <1 x i64> <i64 1>)
25*0a6a1f1dSLionel Sambuc   return vqshl_n_s64(in, 1);
26*0a6a1f1dSLionel Sambuc }
27*0a6a1f1dSLionel Sambuc 
28*0a6a1f1dSLionel Sambuc 
test_vqshlq_n_s8(int8x16_t in)29*0a6a1f1dSLionel Sambuc int8x16_t test_vqshlq_n_s8(int8x16_t in) {
30*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlq_n_s8
31*0a6a1f1dSLionel Sambuc   // CHECK: call <16 x i8> @llvm.aarch64.neon.sqshl.v16i8(<16 x i8> %in, <16 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
32*0a6a1f1dSLionel Sambuc   return vqshlq_n_s8(in, 1);
33*0a6a1f1dSLionel Sambuc }
34*0a6a1f1dSLionel Sambuc 
test_vqshlq_n_s16(int16x8_t in)35*0a6a1f1dSLionel Sambuc int16x8_t test_vqshlq_n_s16(int16x8_t in) {
36*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlq_n_s16
37*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i16> @llvm.aarch64.neon.sqshl.v8i16(<8 x i16> %in, <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>)
38*0a6a1f1dSLionel Sambuc   return vqshlq_n_s16(in, 1);
39*0a6a1f1dSLionel Sambuc }
40*0a6a1f1dSLionel Sambuc 
test_vqshlq_n_s32(int32x4_t in)41*0a6a1f1dSLionel Sambuc int32x4_t test_vqshlq_n_s32(int32x4_t in) {
42*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlq_n_s32
43*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i32> @llvm.aarch64.neon.sqshl.v4i32(<4 x i32> %in, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
44*0a6a1f1dSLionel Sambuc   return vqshlq_n_s32(in, 1);
45*0a6a1f1dSLionel Sambuc }
46*0a6a1f1dSLionel Sambuc 
test_vqshlq_n_s64(int64x2_t in)47*0a6a1f1dSLionel Sambuc int64x2_t test_vqshlq_n_s64(int64x2_t in) {
48*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlq_n_s64
49*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i64> @llvm.aarch64.neon.sqshl.v2i64(<2 x i64> %in, <2 x i64> <i64 1, i64 1>
50*0a6a1f1dSLionel Sambuc   return vqshlq_n_s64(in, 1);
51*0a6a1f1dSLionel Sambuc }
52*0a6a1f1dSLionel Sambuc 
test_vqshl_n_u8(uint8x8_t in)53*0a6a1f1dSLionel Sambuc uint8x8_t test_vqshl_n_u8(uint8x8_t in) {
54*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshl_n_u8
55*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i8> @llvm.aarch64.neon.uqshl.v8i8(<8 x i8> %in, <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
56*0a6a1f1dSLionel Sambuc   return vqshl_n_u8(in, 1);
57*0a6a1f1dSLionel Sambuc }
58*0a6a1f1dSLionel Sambuc 
test_vqshl_n_u16(uint16x4_t in)59*0a6a1f1dSLionel Sambuc uint16x4_t test_vqshl_n_u16(uint16x4_t in) {
60*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshl_n_u16
61*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i16> @llvm.aarch64.neon.uqshl.v4i16(<4 x i16> %in, <4 x i16> <i16 1, i16 1, i16 1, i16 1>)
62*0a6a1f1dSLionel Sambuc   return vqshl_n_u16(in, 1);
63*0a6a1f1dSLionel Sambuc }
64*0a6a1f1dSLionel Sambuc 
test_vqshl_n_u32(uint32x2_t in)65*0a6a1f1dSLionel Sambuc uint32x2_t test_vqshl_n_u32(uint32x2_t in) {
66*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshl_n_u32
67*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i32> @llvm.aarch64.neon.uqshl.v2i32(<2 x i32> %in, <2 x i32> <i32 1, i32 1>)
68*0a6a1f1dSLionel Sambuc   return vqshl_n_u32(in, 1);
69*0a6a1f1dSLionel Sambuc }
70*0a6a1f1dSLionel Sambuc 
test_vqshl_n_u64(uint64x1_t in)71*0a6a1f1dSLionel Sambuc uint64x1_t test_vqshl_n_u64(uint64x1_t in) {
72*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshl_n_u64
73*0a6a1f1dSLionel Sambuc   // CHECK: call <1 x i64> @llvm.aarch64.neon.uqshl.v1i64(<1 x i64> %in, <1 x i64> <i64 1>)
74*0a6a1f1dSLionel Sambuc   return vqshl_n_u64(in, 1);
75*0a6a1f1dSLionel Sambuc }
76*0a6a1f1dSLionel Sambuc 
test_vqshlq_n_u8(uint8x16_t in)77*0a6a1f1dSLionel Sambuc uint8x16_t test_vqshlq_n_u8(uint8x16_t in) {
78*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlq_n_u8
79*0a6a1f1dSLionel Sambuc   // CHECK: call <16 x i8> @llvm.aarch64.neon.uqshl.v16i8(<16 x i8> %in, <16 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
80*0a6a1f1dSLionel Sambuc   return vqshlq_n_u8(in, 1);
81*0a6a1f1dSLionel Sambuc }
82*0a6a1f1dSLionel Sambuc 
test_vqshlq_n_u16(uint16x8_t in)83*0a6a1f1dSLionel Sambuc uint16x8_t test_vqshlq_n_u16(uint16x8_t in) {
84*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlq_n_u16
85*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i16> @llvm.aarch64.neon.uqshl.v8i16(<8 x i16> %in, <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>)
86*0a6a1f1dSLionel Sambuc   return vqshlq_n_u16(in, 1);
87*0a6a1f1dSLionel Sambuc }
88*0a6a1f1dSLionel Sambuc 
test_vqshlq_n_u32(uint32x4_t in)89*0a6a1f1dSLionel Sambuc uint32x4_t test_vqshlq_n_u32(uint32x4_t in) {
90*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlq_n_u32
91*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i32> @llvm.aarch64.neon.uqshl.v4i32(<4 x i32> %in, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
92*0a6a1f1dSLionel Sambuc   return vqshlq_n_u32(in, 1);
93*0a6a1f1dSLionel Sambuc }
94*0a6a1f1dSLionel Sambuc 
test_vqshlq_n_u64(uint64x2_t in)95*0a6a1f1dSLionel Sambuc uint64x2_t test_vqshlq_n_u64(uint64x2_t in) {
96*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlq_n_u64
97*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i64> @llvm.aarch64.neon.uqshl.v2i64(<2 x i64> %in, <2 x i64> <i64 1, i64 1>
98*0a6a1f1dSLionel Sambuc   return vqshlq_n_u64(in, 1);
99*0a6a1f1dSLionel Sambuc }
100*0a6a1f1dSLionel Sambuc 
test_vrshr_n_s8(int8x8_t in)101*0a6a1f1dSLionel Sambuc int8x8_t test_vrshr_n_s8(int8x8_t in) {
102*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshr_n_s8
103*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i8> @llvm.aarch64.neon.srshl.v8i8(<8 x i8> %in, <8 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
104*0a6a1f1dSLionel Sambuc   return vrshr_n_s8(in, 1);
105*0a6a1f1dSLionel Sambuc }
106*0a6a1f1dSLionel Sambuc 
test_vrshr_n_s16(int16x4_t in)107*0a6a1f1dSLionel Sambuc int16x4_t test_vrshr_n_s16(int16x4_t in) {
108*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshr_n_s16
109*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i16> @llvm.aarch64.neon.srshl.v4i16(<4 x i16> %in, <4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>)
110*0a6a1f1dSLionel Sambuc   return vrshr_n_s16(in, 1);
111*0a6a1f1dSLionel Sambuc }
112*0a6a1f1dSLionel Sambuc 
test_vrshr_n_s32(int32x2_t in)113*0a6a1f1dSLionel Sambuc int32x2_t test_vrshr_n_s32(int32x2_t in) {
114*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshr_n_s32
115*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i32> @llvm.aarch64.neon.srshl.v2i32(<2 x i32> %in, <2 x i32> <i32 -1, i32 -1>)
116*0a6a1f1dSLionel Sambuc   return vrshr_n_s32(in, 1);
117*0a6a1f1dSLionel Sambuc }
118*0a6a1f1dSLionel Sambuc 
test_vrshr_n_s64(int64x1_t in)119*0a6a1f1dSLionel Sambuc int64x1_t test_vrshr_n_s64(int64x1_t in) {
120*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshr_n_s64
121*0a6a1f1dSLionel Sambuc   // CHECK: call <1 x i64> @llvm.aarch64.neon.srshl.v1i64(<1 x i64> %in, <1 x i64> <i64 -1>)
122*0a6a1f1dSLionel Sambuc   return vrshr_n_s64(in, 1);
123*0a6a1f1dSLionel Sambuc }
124*0a6a1f1dSLionel Sambuc 
125*0a6a1f1dSLionel Sambuc 
test_vrshrq_n_s8(int8x16_t in)126*0a6a1f1dSLionel Sambuc int8x16_t test_vrshrq_n_s8(int8x16_t in) {
127*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshrq_n_s8
128*0a6a1f1dSLionel Sambuc   // CHECK: call <16 x i8> @llvm.aarch64.neon.srshl.v16i8(<16 x i8> %in, <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
129*0a6a1f1dSLionel Sambuc   return vrshrq_n_s8(in, 1);
130*0a6a1f1dSLionel Sambuc }
131*0a6a1f1dSLionel Sambuc 
test_vrshrq_n_s16(int16x8_t in)132*0a6a1f1dSLionel Sambuc int16x8_t test_vrshrq_n_s16(int16x8_t in) {
133*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshrq_n_s16
134*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i16> @llvm.aarch64.neon.srshl.v8i16(<8 x i16> %in, <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>)
135*0a6a1f1dSLionel Sambuc   return vrshrq_n_s16(in, 1);
136*0a6a1f1dSLionel Sambuc }
137*0a6a1f1dSLionel Sambuc 
test_vrshrq_n_s32(int32x4_t in)138*0a6a1f1dSLionel Sambuc int32x4_t test_vrshrq_n_s32(int32x4_t in) {
139*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshrq_n_s32
140*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i32> @llvm.aarch64.neon.srshl.v4i32(<4 x i32> %in, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>)
141*0a6a1f1dSLionel Sambuc   return vrshrq_n_s32(in, 1);
142*0a6a1f1dSLionel Sambuc }
143*0a6a1f1dSLionel Sambuc 
test_vrshrq_n_s64(int64x2_t in)144*0a6a1f1dSLionel Sambuc int64x2_t test_vrshrq_n_s64(int64x2_t in) {
145*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshrq_n_s64
146*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i64> @llvm.aarch64.neon.srshl.v2i64(<2 x i64> %in, <2 x i64> <i64 -1, i64 -1>
147*0a6a1f1dSLionel Sambuc   return vrshrq_n_s64(in, 1);
148*0a6a1f1dSLionel Sambuc }
149*0a6a1f1dSLionel Sambuc 
test_vrshr_n_u8(uint8x8_t in)150*0a6a1f1dSLionel Sambuc uint8x8_t test_vrshr_n_u8(uint8x8_t in) {
151*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshr_n_u8
152*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i8> @llvm.aarch64.neon.urshl.v8i8(<8 x i8> %in, <8 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
153*0a6a1f1dSLionel Sambuc   return vrshr_n_u8(in, 1);
154*0a6a1f1dSLionel Sambuc }
155*0a6a1f1dSLionel Sambuc 
test_vrshr_n_u16(uint16x4_t in)156*0a6a1f1dSLionel Sambuc uint16x4_t test_vrshr_n_u16(uint16x4_t in) {
157*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshr_n_u16
158*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i16> @llvm.aarch64.neon.urshl.v4i16(<4 x i16> %in, <4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>)
159*0a6a1f1dSLionel Sambuc   return vrshr_n_u16(in, 1);
160*0a6a1f1dSLionel Sambuc }
161*0a6a1f1dSLionel Sambuc 
test_vrshr_n_u32(uint32x2_t in)162*0a6a1f1dSLionel Sambuc uint32x2_t test_vrshr_n_u32(uint32x2_t in) {
163*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshr_n_u32
164*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i32> @llvm.aarch64.neon.urshl.v2i32(<2 x i32> %in, <2 x i32> <i32 -1, i32 -1>)
165*0a6a1f1dSLionel Sambuc   return vrshr_n_u32(in, 1);
166*0a6a1f1dSLionel Sambuc }
167*0a6a1f1dSLionel Sambuc 
test_vrshr_n_u64(uint64x1_t in)168*0a6a1f1dSLionel Sambuc uint64x1_t test_vrshr_n_u64(uint64x1_t in) {
169*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshr_n_u64
170*0a6a1f1dSLionel Sambuc   // CHECK: call <1 x i64> @llvm.aarch64.neon.urshl.v1i64(<1 x i64> %in, <1 x i64> <i64 -1>)
171*0a6a1f1dSLionel Sambuc   return vrshr_n_u64(in, 1);
172*0a6a1f1dSLionel Sambuc }
173*0a6a1f1dSLionel Sambuc 
test_vrshrq_n_u8(uint8x16_t in)174*0a6a1f1dSLionel Sambuc uint8x16_t test_vrshrq_n_u8(uint8x16_t in) {
175*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshrq_n_u8
176*0a6a1f1dSLionel Sambuc   // CHECK: call <16 x i8> @llvm.aarch64.neon.urshl.v16i8(<16 x i8> %in, <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
177*0a6a1f1dSLionel Sambuc   return vrshrq_n_u8(in, 1);
178*0a6a1f1dSLionel Sambuc }
179*0a6a1f1dSLionel Sambuc 
test_vrshrq_n_u16(uint16x8_t in)180*0a6a1f1dSLionel Sambuc uint16x8_t test_vrshrq_n_u16(uint16x8_t in) {
181*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshrq_n_u16
182*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i16> @llvm.aarch64.neon.urshl.v8i16(<8 x i16> %in, <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>)
183*0a6a1f1dSLionel Sambuc   return vrshrq_n_u16(in, 1);
184*0a6a1f1dSLionel Sambuc }
185*0a6a1f1dSLionel Sambuc 
test_vrshrq_n_u32(uint32x4_t in)186*0a6a1f1dSLionel Sambuc uint32x4_t test_vrshrq_n_u32(uint32x4_t in) {
187*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshrq_n_u32
188*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i32> @llvm.aarch64.neon.urshl.v4i32(<4 x i32> %in, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>)
189*0a6a1f1dSLionel Sambuc   return vrshrq_n_u32(in, 1);
190*0a6a1f1dSLionel Sambuc }
191*0a6a1f1dSLionel Sambuc 
test_vrshrq_n_u64(uint64x2_t in)192*0a6a1f1dSLionel Sambuc uint64x2_t test_vrshrq_n_u64(uint64x2_t in) {
193*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrshrq_n_u64
194*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i64> @llvm.aarch64.neon.urshl.v2i64(<2 x i64> %in, <2 x i64> <i64 -1, i64 -1>
195*0a6a1f1dSLionel Sambuc   return vrshrq_n_u64(in, 1);
196*0a6a1f1dSLionel Sambuc }
197*0a6a1f1dSLionel Sambuc 
test_vqshlu_n_s8(int8x8_t in)198*0a6a1f1dSLionel Sambuc int8x8_t test_vqshlu_n_s8(int8x8_t in) {
199*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlu_n_s8
200*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i8> @llvm.aarch64.neon.sqshlu.v8i8(<8 x i8> %in, <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
201*0a6a1f1dSLionel Sambuc   return vqshlu_n_s8(in, 1);
202*0a6a1f1dSLionel Sambuc }
203*0a6a1f1dSLionel Sambuc 
test_vqshlu_n_s16(int16x4_t in)204*0a6a1f1dSLionel Sambuc int16x4_t test_vqshlu_n_s16(int16x4_t in) {
205*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlu_n_s16
206*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i16> @llvm.aarch64.neon.sqshlu.v4i16(<4 x i16> %in, <4 x i16> <i16 1, i16 1, i16 1, i16 1>)
207*0a6a1f1dSLionel Sambuc   return vqshlu_n_s16(in, 1);
208*0a6a1f1dSLionel Sambuc }
209*0a6a1f1dSLionel Sambuc 
test_vqshlu_n_s32(int32x2_t in)210*0a6a1f1dSLionel Sambuc int32x2_t test_vqshlu_n_s32(int32x2_t in) {
211*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlu_n_s32
212*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i32> @llvm.aarch64.neon.sqshlu.v2i32(<2 x i32> %in, <2 x i32> <i32 1, i32 1>)
213*0a6a1f1dSLionel Sambuc   return vqshlu_n_s32(in, 1);
214*0a6a1f1dSLionel Sambuc }
215*0a6a1f1dSLionel Sambuc 
test_vqshlu_n_s64(int64x1_t in)216*0a6a1f1dSLionel Sambuc int64x1_t test_vqshlu_n_s64(int64x1_t in) {
217*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshlu_n_s64
218*0a6a1f1dSLionel Sambuc   // CHECK: call <1 x i64> @llvm.aarch64.neon.sqshlu.v1i64(<1 x i64> %in, <1 x i64> <i64 1>)
219*0a6a1f1dSLionel Sambuc   return vqshlu_n_s64(in, 1);
220*0a6a1f1dSLionel Sambuc }
221*0a6a1f1dSLionel Sambuc 
222*0a6a1f1dSLionel Sambuc 
test_vqshluq_n_s8(int8x16_t in)223*0a6a1f1dSLionel Sambuc int8x16_t test_vqshluq_n_s8(int8x16_t in) {
224*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshluq_n_s8
225*0a6a1f1dSLionel Sambuc   // CHECK: call <16 x i8> @llvm.aarch64.neon.sqshlu.v16i8(<16 x i8> %in, <16 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
226*0a6a1f1dSLionel Sambuc   return vqshluq_n_s8(in, 1);
227*0a6a1f1dSLionel Sambuc }
228*0a6a1f1dSLionel Sambuc 
test_vqshluq_n_s16(int16x8_t in)229*0a6a1f1dSLionel Sambuc int16x8_t test_vqshluq_n_s16(int16x8_t in) {
230*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshluq_n_s16
231*0a6a1f1dSLionel Sambuc   // CHECK: call <8 x i16> @llvm.aarch64.neon.sqshlu.v8i16(<8 x i16> %in, <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>)
232*0a6a1f1dSLionel Sambuc   return vqshluq_n_s16(in, 1);
233*0a6a1f1dSLionel Sambuc }
234*0a6a1f1dSLionel Sambuc 
test_vqshluq_n_s32(int32x4_t in)235*0a6a1f1dSLionel Sambuc int32x4_t test_vqshluq_n_s32(int32x4_t in) {
236*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshluq_n_s32
237*0a6a1f1dSLionel Sambuc   // CHECK: call <4 x i32> @llvm.aarch64.neon.sqshlu.v4i32(<4 x i32> %in, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
238*0a6a1f1dSLionel Sambuc   return vqshluq_n_s32(in, 1);
239*0a6a1f1dSLionel Sambuc }
240*0a6a1f1dSLionel Sambuc 
test_vqshluq_n_s64(int64x2_t in)241*0a6a1f1dSLionel Sambuc int64x2_t test_vqshluq_n_s64(int64x2_t in) {
242*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vqshluq_n_s64
243*0a6a1f1dSLionel Sambuc   // CHECK: call <2 x i64> @llvm.aarch64.neon.sqshlu.v2i64(<2 x i64> %in, <2 x i64> <i64 1, i64 1>
244*0a6a1f1dSLionel Sambuc   return vqshluq_n_s64(in, 1);
245*0a6a1f1dSLionel Sambuc }
246*0a6a1f1dSLionel Sambuc 
test_vrsra_n_s8(int8x8_t acc,int8x8_t in)247*0a6a1f1dSLionel Sambuc int8x8_t test_vrsra_n_s8(int8x8_t acc, int8x8_t in) {
248*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsra_n_s8
249*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <8 x i8> @llvm.aarch64.neon.srshl.v8i8(<8 x i8> %in, <8 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
250*0a6a1f1dSLionel Sambuc   // CHECK: add <8 x i8> [[TMP]], %acc
251*0a6a1f1dSLionel Sambuc   return vrsra_n_s8(acc, in, 1);
252*0a6a1f1dSLionel Sambuc }
253*0a6a1f1dSLionel Sambuc 
test_vrsra_n_s16(int16x4_t acc,int16x4_t in)254*0a6a1f1dSLionel Sambuc int16x4_t test_vrsra_n_s16(int16x4_t acc, int16x4_t in) {
255*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsra_n_s16
256*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <4 x i16> @llvm.aarch64.neon.srshl.v4i16(<4 x i16> %in, <4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>)
257*0a6a1f1dSLionel Sambuc   // CHECK: add <4 x i16> [[TMP]], %acc
258*0a6a1f1dSLionel Sambuc   return vrsra_n_s16(acc, in, 1);
259*0a6a1f1dSLionel Sambuc }
260*0a6a1f1dSLionel Sambuc 
test_vrsra_n_s32(int32x2_t acc,int32x2_t in)261*0a6a1f1dSLionel Sambuc int32x2_t test_vrsra_n_s32(int32x2_t acc, int32x2_t in) {
262*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsra_n_s32
263*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <2 x i32> @llvm.aarch64.neon.srshl.v2i32(<2 x i32> %in, <2 x i32> <i32 -1, i32 -1>)
264*0a6a1f1dSLionel Sambuc   // CHECK: add <2 x i32> [[TMP]], %acc
265*0a6a1f1dSLionel Sambuc   return vrsra_n_s32(acc, in, 1);
266*0a6a1f1dSLionel Sambuc }
267*0a6a1f1dSLionel Sambuc 
test_vrsra_n_s64(int64x1_t acc,int64x1_t in)268*0a6a1f1dSLionel Sambuc int64x1_t test_vrsra_n_s64(int64x1_t acc, int64x1_t in) {
269*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsra_n_s64
270*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <1 x i64> @llvm.aarch64.neon.srshl.v1i64(<1 x i64> %in, <1 x i64> <i64 -1>)
271*0a6a1f1dSLionel Sambuc   // CHECK: add <1 x i64> [[TMP]], %acc
272*0a6a1f1dSLionel Sambuc   return vrsra_n_s64(acc, in, 1);
273*0a6a1f1dSLionel Sambuc }
274*0a6a1f1dSLionel Sambuc 
test_vrsraq_n_s8(int8x16_t acc,int8x16_t in)275*0a6a1f1dSLionel Sambuc int8x16_t test_vrsraq_n_s8(int8x16_t acc, int8x16_t in) {
276*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsraq_n_s8
277*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <16 x i8> @llvm.aarch64.neon.srshl.v16i8(<16 x i8> %in, <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
278*0a6a1f1dSLionel Sambuc   // CHECK: add <16 x i8> [[TMP]], %acc
279*0a6a1f1dSLionel Sambuc   return vrsraq_n_s8(acc, in, 1);
280*0a6a1f1dSLionel Sambuc }
281*0a6a1f1dSLionel Sambuc 
test_vrsraq_n_s16(int16x8_t acc,int16x8_t in)282*0a6a1f1dSLionel Sambuc int16x8_t test_vrsraq_n_s16(int16x8_t acc, int16x8_t in) {
283*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsraq_n_s16
284*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <8 x i16> @llvm.aarch64.neon.srshl.v8i16(<8 x i16> %in, <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>)
285*0a6a1f1dSLionel Sambuc   // CHECK: add <8 x i16> [[TMP]], %acc
286*0a6a1f1dSLionel Sambuc   return vrsraq_n_s16(acc, in, 1);
287*0a6a1f1dSLionel Sambuc }
288*0a6a1f1dSLionel Sambuc 
test_vrsraq_n_s32(int32x4_t acc,int32x4_t in)289*0a6a1f1dSLionel Sambuc int32x4_t test_vrsraq_n_s32(int32x4_t acc, int32x4_t in) {
290*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsraq_n_s32
291*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <4 x i32> @llvm.aarch64.neon.srshl.v4i32(<4 x i32> %in, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>)
292*0a6a1f1dSLionel Sambuc   // CHECK: add <4 x i32> [[TMP]], %acc
293*0a6a1f1dSLionel Sambuc   return vrsraq_n_s32(acc, in, 1);
294*0a6a1f1dSLionel Sambuc }
295*0a6a1f1dSLionel Sambuc 
test_vrsraq_n_s64(int64x2_t acc,int64x2_t in)296*0a6a1f1dSLionel Sambuc int64x2_t test_vrsraq_n_s64(int64x2_t acc, int64x2_t in) {
297*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsraq_n_s64
298*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <2 x i64> @llvm.aarch64.neon.srshl.v2i64(<2 x i64> %in, <2 x i64> <i64 -1, i64 -1>)
299*0a6a1f1dSLionel Sambuc   // CHECK: add <2 x i64> [[TMP]], %acc
300*0a6a1f1dSLionel Sambuc   return vrsraq_n_s64(acc, in, 1);
301*0a6a1f1dSLionel Sambuc }
302*0a6a1f1dSLionel Sambuc 
test_vrsra_n_u8(uint8x8_t acc,uint8x8_t in)303*0a6a1f1dSLionel Sambuc uint8x8_t test_vrsra_n_u8(uint8x8_t acc, uint8x8_t in) {
304*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsra_n_u8
305*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <8 x i8> @llvm.aarch64.neon.urshl.v8i8(<8 x i8> %in, <8 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
306*0a6a1f1dSLionel Sambuc   // CHECK: add <8 x i8> [[TMP]], %acc
307*0a6a1f1dSLionel Sambuc   return vrsra_n_u8(acc, in, 1);
308*0a6a1f1dSLionel Sambuc }
309*0a6a1f1dSLionel Sambuc 
test_vrsra_n_u16(uint16x4_t acc,uint16x4_t in)310*0a6a1f1dSLionel Sambuc uint16x4_t test_vrsra_n_u16(uint16x4_t acc, uint16x4_t in) {
311*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsra_n_u16
312*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <4 x i16> @llvm.aarch64.neon.urshl.v4i16(<4 x i16> %in, <4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>)
313*0a6a1f1dSLionel Sambuc   // CHECK: add <4 x i16> [[TMP]], %acc
314*0a6a1f1dSLionel Sambuc   return vrsra_n_u16(acc, in, 1);
315*0a6a1f1dSLionel Sambuc }
316*0a6a1f1dSLionel Sambuc 
test_vrsra_n_u32(uint32x2_t acc,uint32x2_t in)317*0a6a1f1dSLionel Sambuc uint32x2_t test_vrsra_n_u32(uint32x2_t acc, uint32x2_t in) {
318*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsra_n_u32
319*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <2 x i32> @llvm.aarch64.neon.urshl.v2i32(<2 x i32> %in, <2 x i32> <i32 -1, i32 -1>)
320*0a6a1f1dSLionel Sambuc   // CHECK: add <2 x i32> [[TMP]], %acc
321*0a6a1f1dSLionel Sambuc   return vrsra_n_u32(acc, in, 1);
322*0a6a1f1dSLionel Sambuc }
323*0a6a1f1dSLionel Sambuc 
test_vrsra_n_u64(uint64x1_t acc,uint64x1_t in)324*0a6a1f1dSLionel Sambuc uint64x1_t test_vrsra_n_u64(uint64x1_t acc, uint64x1_t in) {
325*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsra_n_u64
326*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <1 x i64> @llvm.aarch64.neon.urshl.v1i64(<1 x i64> %in, <1 x i64> <i64 -1>)
327*0a6a1f1dSLionel Sambuc   // CHECK: add <1 x i64> [[TMP]], %acc
328*0a6a1f1dSLionel Sambuc   return vrsra_n_u64(acc, in, 1);
329*0a6a1f1dSLionel Sambuc }
330*0a6a1f1dSLionel Sambuc 
test_vrsraq_n_u8(uint8x16_t acc,uint8x16_t in)331*0a6a1f1dSLionel Sambuc uint8x16_t test_vrsraq_n_u8(uint8x16_t acc, uint8x16_t in) {
332*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsraq_n_u8
333*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <16 x i8> @llvm.aarch64.neon.urshl.v16i8(<16 x i8> %in, <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
334*0a6a1f1dSLionel Sambuc   // CHECK: add <16 x i8> [[TMP]], %acc
335*0a6a1f1dSLionel Sambuc   return vrsraq_n_u8(acc, in, 1);
336*0a6a1f1dSLionel Sambuc }
337*0a6a1f1dSLionel Sambuc 
test_vrsraq_n_u16(uint16x8_t acc,uint16x8_t in)338*0a6a1f1dSLionel Sambuc uint16x8_t test_vrsraq_n_u16(uint16x8_t acc, uint16x8_t in) {
339*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsraq_n_u16
340*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <8 x i16> @llvm.aarch64.neon.urshl.v8i16(<8 x i16> %in, <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>)
341*0a6a1f1dSLionel Sambuc   // CHECK: add <8 x i16> [[TMP]], %acc
342*0a6a1f1dSLionel Sambuc   return vrsraq_n_u16(acc, in, 1);
343*0a6a1f1dSLionel Sambuc }
344*0a6a1f1dSLionel Sambuc 
test_vrsraq_n_u32(uint32x4_t acc,uint32x4_t in)345*0a6a1f1dSLionel Sambuc uint32x4_t test_vrsraq_n_u32(uint32x4_t acc, uint32x4_t in) {
346*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsraq_n_u32
347*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <4 x i32> @llvm.aarch64.neon.urshl.v4i32(<4 x i32> %in, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>)
348*0a6a1f1dSLionel Sambuc   // CHECK: add <4 x i32> [[TMP]], %acc
349*0a6a1f1dSLionel Sambuc   return vrsraq_n_u32(acc, in, 1);
350*0a6a1f1dSLionel Sambuc }
351*0a6a1f1dSLionel Sambuc 
test_vrsraq_n_u64(uint64x2_t acc,uint64x2_t in)352*0a6a1f1dSLionel Sambuc uint64x2_t test_vrsraq_n_u64(uint64x2_t acc, uint64x2_t in) {
353*0a6a1f1dSLionel Sambuc   // CHECK-LABEL: @test_vrsraq_n_u64
354*0a6a1f1dSLionel Sambuc   // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <2 x i64> @llvm.aarch64.neon.urshl.v2i64(<2 x i64> %in, <2 x i64> <i64 -1, i64 -1>)
355*0a6a1f1dSLionel Sambuc   // CHECK: add <2 x i64> [[TMP]], %acc
356*0a6a1f1dSLionel Sambuc   return vrsraq_n_u64(acc, in, 1);
357*0a6a1f1dSLionel Sambuc }
358