1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s
4 ; The mask is all-ones, potentially shifted.
6 ;------------------------------------------------------------------------------;
7 ; 128-bit vector; 8-bit elements = 16 elements
8 ;------------------------------------------------------------------------------;
12 define <16 x i8> @test_128_i8_x_16_7_mask_lshr_1(<16 x i8> %a0) {
13 ; CHECK-LABEL: test_128_i8_x_16_7_mask_lshr_1:
15 ; CHECK-NEXT: movi v1.16b, #7
16 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
17 ; CHECK-NEXT: ushr v0.16b, v0.16b, #1
19 %t0 = and <16 x i8> %a0, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
20 %t1 = lshr <16 x i8> %t0, <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>
24 define <16 x i8> @test_128_i8_x_16_28_mask_lshr_1(<16 x i8> %a0) {
25 ; CHECK-LABEL: test_128_i8_x_16_28_mask_lshr_1:
27 ; CHECK-NEXT: movi v1.16b, #28
28 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
29 ; CHECK-NEXT: ushr v0.16b, v0.16b, #1
31 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
32 %t1 = lshr <16 x i8> %t0, <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>
35 define <16 x i8> @test_128_i8_x_16_28_mask_lshr_2(<16 x i8> %a0) {
36 ; CHECK-LABEL: test_128_i8_x_16_28_mask_lshr_2:
38 ; CHECK-NEXT: movi v1.16b, #28
39 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
40 ; CHECK-NEXT: ushr v0.16b, v0.16b, #2
42 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
43 %t1 = lshr <16 x i8> %t0, <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
46 define <16 x i8> @test_128_i8_x_16_28_mask_lshr_3(<16 x i8> %a0) {
47 ; CHECK-LABEL: test_128_i8_x_16_28_mask_lshr_3:
49 ; CHECK-NEXT: movi v1.16b, #28
50 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
51 ; CHECK-NEXT: ushr v0.16b, v0.16b, #3
53 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
54 %t1 = lshr <16 x i8> %t0, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
57 define <16 x i8> @test_128_i8_x_16_28_mask_lshr_4(<16 x i8> %a0) {
58 ; CHECK-LABEL: test_128_i8_x_16_28_mask_lshr_4:
60 ; CHECK-NEXT: movi v1.16b, #28
61 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
62 ; CHECK-NEXT: ushr v0.16b, v0.16b, #4
64 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
65 %t1 = lshr <16 x i8> %t0, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
69 define <16 x i8> @test_128_i8_x_16_224_mask_lshr_1(<16 x i8> %a0) {
70 ; CHECK-LABEL: test_128_i8_x_16_224_mask_lshr_1:
72 ; CHECK-NEXT: movi v1.16b, #224
73 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
74 ; CHECK-NEXT: ushr v0.16b, v0.16b, #1
76 %t0 = and <16 x i8> %a0, <i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224>
77 %t1 = lshr <16 x i8> %t0, <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 define <16 x i8> @test_128_i8_x_16_224_mask_lshr_4(<16 x i8> %a0) {
81 ; CHECK-LABEL: test_128_i8_x_16_224_mask_lshr_4:
83 ; CHECK-NEXT: movi v1.16b, #224
84 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
85 ; CHECK-NEXT: ushr v0.16b, v0.16b, #4
87 %t0 = and <16 x i8> %a0, <i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224>
88 %t1 = lshr <16 x i8> %t0, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
91 define <16 x i8> @test_128_i8_x_16_224_mask_lshr_5(<16 x i8> %a0) {
92 ; CHECK-LABEL: test_128_i8_x_16_224_mask_lshr_5:
94 ; CHECK-NEXT: ushr v0.16b, v0.16b, #5
96 %t0 = and <16 x i8> %a0, <i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224>
97 %t1 = lshr <16 x i8> %t0, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
100 define <16 x i8> @test_128_i8_x_16_224_mask_lshr_6(<16 x i8> %a0) {
101 ; CHECK-LABEL: test_128_i8_x_16_224_mask_lshr_6:
103 ; CHECK-NEXT: ushr v0.16b, v0.16b, #6
105 %t0 = and <16 x i8> %a0, <i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224>
106 %t1 = lshr <16 x i8> %t0, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
112 define <16 x i8> @test_128_i8_x_16_7_mask_ashr_1(<16 x i8> %a0) {
113 ; CHECK-LABEL: test_128_i8_x_16_7_mask_ashr_1:
115 ; CHECK-NEXT: movi v1.16b, #7
116 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
117 ; CHECK-NEXT: ushr v0.16b, v0.16b, #1
119 %t0 = and <16 x i8> %a0, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
120 %t1 = ashr <16 x i8> %t0, <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>
124 define <16 x i8> @test_128_i8_x_16_28_mask_ashr_1(<16 x i8> %a0) {
125 ; CHECK-LABEL: test_128_i8_x_16_28_mask_ashr_1:
127 ; CHECK-NEXT: movi v1.16b, #28
128 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
129 ; CHECK-NEXT: ushr v0.16b, v0.16b, #1
131 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
132 %t1 = ashr <16 x i8> %t0, <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>
135 define <16 x i8> @test_128_i8_x_16_28_mask_ashr_2(<16 x i8> %a0) {
136 ; CHECK-LABEL: test_128_i8_x_16_28_mask_ashr_2:
138 ; CHECK-NEXT: movi v1.16b, #28
139 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
140 ; CHECK-NEXT: ushr v0.16b, v0.16b, #2
142 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
143 %t1 = ashr <16 x i8> %t0, <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
146 define <16 x i8> @test_128_i8_x_16_28_mask_ashr_3(<16 x i8> %a0) {
147 ; CHECK-LABEL: test_128_i8_x_16_28_mask_ashr_3:
149 ; CHECK-NEXT: movi v1.16b, #28
150 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
151 ; CHECK-NEXT: ushr v0.16b, v0.16b, #3
153 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
154 %t1 = ashr <16 x i8> %t0, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
157 define <16 x i8> @test_128_i8_x_16_28_mask_ashr_4(<16 x i8> %a0) {
158 ; CHECK-LABEL: test_128_i8_x_16_28_mask_ashr_4:
160 ; CHECK-NEXT: movi v1.16b, #28
161 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
162 ; CHECK-NEXT: ushr v0.16b, v0.16b, #4
164 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
165 %t1 = ashr <16 x i8> %t0, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
169 define <16 x i8> @test_128_i8_x_16_224_mask_ashr_1(<16 x i8> %a0) {
170 ; CHECK-LABEL: test_128_i8_x_16_224_mask_ashr_1:
172 ; CHECK-NEXT: movi v1.16b, #224
173 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
174 ; CHECK-NEXT: sshr v0.16b, v0.16b, #1
176 %t0 = and <16 x i8> %a0, <i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224>
177 %t1 = ashr <16 x i8> %t0, <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>
180 define <16 x i8> @test_128_i8_x_16_224_mask_ashr_4(<16 x i8> %a0) {
181 ; CHECK-LABEL: test_128_i8_x_16_224_mask_ashr_4:
183 ; CHECK-NEXT: movi v1.16b, #224
184 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
185 ; CHECK-NEXT: sshr v0.16b, v0.16b, #4
187 %t0 = and <16 x i8> %a0, <i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224>
188 %t1 = ashr <16 x i8> %t0, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
191 define <16 x i8> @test_128_i8_x_16_224_mask_ashr_5(<16 x i8> %a0) {
192 ; CHECK-LABEL: test_128_i8_x_16_224_mask_ashr_5:
194 ; CHECK-NEXT: sshr v0.16b, v0.16b, #5
196 %t0 = and <16 x i8> %a0, <i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224>
197 %t1 = ashr <16 x i8> %t0, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
200 define <16 x i8> @test_128_i8_x_16_224_mask_ashr_6(<16 x i8> %a0) {
201 ; CHECK-LABEL: test_128_i8_x_16_224_mask_ashr_6:
203 ; CHECK-NEXT: sshr v0.16b, v0.16b, #6
205 %t0 = and <16 x i8> %a0, <i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224>
206 %t1 = ashr <16 x i8> %t0, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
212 define <16 x i8> @test_128_i8_x_16_7_mask_shl_1(<16 x i8> %a0) {
213 ; CHECK-LABEL: test_128_i8_x_16_7_mask_shl_1:
215 ; CHECK-NEXT: movi v1.16b, #7
216 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
217 ; CHECK-NEXT: add v0.16b, v0.16b, v0.16b
219 %t0 = and <16 x i8> %a0, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
220 %t1 = shl <16 x i8> %t0, <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>
223 define <16 x i8> @test_128_i8_x_16_7_mask_shl_4(<16 x i8> %a0) {
224 ; CHECK-LABEL: test_128_i8_x_16_7_mask_shl_4:
226 ; CHECK-NEXT: movi v1.16b, #7
227 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
228 ; CHECK-NEXT: shl v0.16b, v0.16b, #4
230 %t0 = and <16 x i8> %a0, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
231 %t1 = shl <16 x i8> %t0, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
234 define <16 x i8> @test_128_i8_x_16_7_mask_shl_5(<16 x i8> %a0) {
235 ; CHECK-LABEL: test_128_i8_x_16_7_mask_shl_5:
237 ; CHECK-NEXT: shl v0.16b, v0.16b, #5
239 %t0 = and <16 x i8> %a0, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
240 %t1 = shl <16 x i8> %t0, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
243 define <16 x i8> @test_128_i8_x_16_7_mask_shl_6(<16 x i8> %a0) {
244 ; CHECK-LABEL: test_128_i8_x_16_7_mask_shl_6:
246 ; CHECK-NEXT: shl v0.16b, v0.16b, #6
248 %t0 = and <16 x i8> %a0, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
249 %t1 = shl <16 x i8> %t0, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
253 define <16 x i8> @test_128_i8_x_16_28_mask_shl_1(<16 x i8> %a0) {
254 ; CHECK-LABEL: test_128_i8_x_16_28_mask_shl_1:
256 ; CHECK-NEXT: movi v1.16b, #28
257 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
258 ; CHECK-NEXT: add v0.16b, v0.16b, v0.16b
260 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
261 %t1 = shl <16 x i8> %t0, <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>
264 define <16 x i8> @test_128_i8_x_16_28_mask_shl_2(<16 x i8> %a0) {
265 ; CHECK-LABEL: test_128_i8_x_16_28_mask_shl_2:
267 ; CHECK-NEXT: movi v1.16b, #28
268 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
269 ; CHECK-NEXT: shl v0.16b, v0.16b, #2
271 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
272 %t1 = shl <16 x i8> %t0, <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
275 define <16 x i8> @test_128_i8_x_16_28_mask_shl_3(<16 x i8> %a0) {
276 ; CHECK-LABEL: test_128_i8_x_16_28_mask_shl_3:
278 ; CHECK-NEXT: movi v1.16b, #28
279 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
280 ; CHECK-NEXT: shl v0.16b, v0.16b, #3
282 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
283 %t1 = shl <16 x i8> %t0, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
286 define <16 x i8> @test_128_i8_x_16_28_mask_shl_4(<16 x i8> %a0) {
287 ; CHECK-LABEL: test_128_i8_x_16_28_mask_shl_4:
289 ; CHECK-NEXT: movi v1.16b, #28
290 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
291 ; CHECK-NEXT: shl v0.16b, v0.16b, #4
293 %t0 = and <16 x i8> %a0, <i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28, i8 28>
294 %t1 = shl <16 x i8> %t0, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
298 define <16 x i8> @test_128_i8_x_16_224_mask_shl_1(<16 x i8> %a0) {
299 ; CHECK-LABEL: test_128_i8_x_16_224_mask_shl_1:
301 ; CHECK-NEXT: movi v1.16b, #224
302 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
303 ; CHECK-NEXT: add v0.16b, v0.16b, v0.16b
305 %t0 = and <16 x i8> %a0, <i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224, i8 224>
306 %t1 = shl <16 x i8> %t0, <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>
310 ;------------------------------------------------------------------------------;
311 ; 128-bit vector; 16-bit elements = 8 elements
312 ;------------------------------------------------------------------------------;
316 define <8 x i16> @test_128_i16_x_8_127_mask_lshr_1(<8 x i16> %a0) {
317 ; CHECK-LABEL: test_128_i16_x_8_127_mask_lshr_1:
319 ; CHECK-NEXT: movi v1.8h, #127
320 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
321 ; CHECK-NEXT: ushr v0.8h, v0.8h, #1
323 %t0 = and <8 x i16> %a0, <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
324 %t1 = lshr <8 x i16> %t0, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
328 define <8 x i16> @test_128_i16_x_8_2032_mask_lshr_3(<8 x i16> %a0) {
329 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_lshr_3:
331 ; CHECK-NEXT: mov w8, #2032
332 ; CHECK-NEXT: dup v1.8h, w8
333 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
334 ; CHECK-NEXT: ushr v0.8h, v0.8h, #3
336 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
337 %t1 = lshr <8 x i16> %t0, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
340 define <8 x i16> @test_128_i16_x_8_2032_mask_lshr_4(<8 x i16> %a0) {
341 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_lshr_4:
343 ; CHECK-NEXT: mov w8, #2032
344 ; CHECK-NEXT: dup v1.8h, w8
345 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
346 ; CHECK-NEXT: ushr v0.8h, v0.8h, #4
348 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
349 %t1 = lshr <8 x i16> %t0, <i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4>
352 define <8 x i16> @test_128_i16_x_8_2032_mask_lshr_5(<8 x i16> %a0) {
353 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_lshr_5:
355 ; CHECK-NEXT: mov w8, #2032
356 ; CHECK-NEXT: dup v1.8h, w8
357 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
358 ; CHECK-NEXT: ushr v0.8h, v0.8h, #5
360 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
361 %t1 = lshr <8 x i16> %t0, <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
364 define <8 x i16> @test_128_i16_x_8_2032_mask_lshr_6(<8 x i16> %a0) {
365 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_lshr_6:
367 ; CHECK-NEXT: mov w8, #2032
368 ; CHECK-NEXT: dup v1.8h, w8
369 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
370 ; CHECK-NEXT: ushr v0.8h, v0.8h, #6
372 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
373 %t1 = lshr <8 x i16> %t0, <i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6>
377 define <8 x i16> @test_128_i16_x_8_65024_mask_lshr_1(<8 x i16> %a0) {
378 ; CHECK-LABEL: test_128_i16_x_8_65024_mask_lshr_1:
380 ; CHECK-NEXT: movi v1.8h, #254, lsl #8
381 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
382 ; CHECK-NEXT: ushr v0.8h, v0.8h, #1
384 %t0 = and <8 x i16> %a0, <i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024>
385 %t1 = lshr <8 x i16> %t0, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
388 define <8 x i16> @test_128_i16_x_8_65024_mask_lshr_8(<8 x i16> %a0) {
389 ; CHECK-LABEL: test_128_i16_x_8_65024_mask_lshr_8:
391 ; CHECK-NEXT: movi v1.8h, #254, lsl #8
392 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
393 ; CHECK-NEXT: ushr v0.8h, v0.8h, #8
395 %t0 = and <8 x i16> %a0, <i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024>
396 %t1 = lshr <8 x i16> %t0, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
399 define <8 x i16> @test_128_i16_x_8_65024_mask_lshr_9(<8 x i16> %a0) {
400 ; CHECK-LABEL: test_128_i16_x_8_65024_mask_lshr_9:
402 ; CHECK-NEXT: ushr v0.8h, v0.8h, #9
404 %t0 = and <8 x i16> %a0, <i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024>
405 %t1 = lshr <8 x i16> %t0, <i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9>
408 define <8 x i16> @test_128_i16_x_8_65024_mask_lshr_10(<8 x i16> %a0) {
409 ; CHECK-LABEL: test_128_i16_x_8_65024_mask_lshr_10:
411 ; CHECK-NEXT: ushr v0.8h, v0.8h, #10
413 %t0 = and <8 x i16> %a0, <i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024>
414 %t1 = lshr <8 x i16> %t0, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
420 define <8 x i16> @test_128_i16_x_8_127_mask_ashr_1(<8 x i16> %a0) {
421 ; CHECK-LABEL: test_128_i16_x_8_127_mask_ashr_1:
423 ; CHECK-NEXT: movi v1.8h, #127
424 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
425 ; CHECK-NEXT: ushr v0.8h, v0.8h, #1
427 %t0 = and <8 x i16> %a0, <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
428 %t1 = ashr <8 x i16> %t0, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
432 define <8 x i16> @test_128_i16_x_8_2032_mask_ashr_3(<8 x i16> %a0) {
433 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_ashr_3:
435 ; CHECK-NEXT: mov w8, #2032
436 ; CHECK-NEXT: dup v1.8h, w8
437 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
438 ; CHECK-NEXT: ushr v0.8h, v0.8h, #3
440 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
441 %t1 = ashr <8 x i16> %t0, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
444 define <8 x i16> @test_128_i16_x_8_2032_mask_ashr_4(<8 x i16> %a0) {
445 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_ashr_4:
447 ; CHECK-NEXT: mov w8, #2032
448 ; CHECK-NEXT: dup v1.8h, w8
449 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
450 ; CHECK-NEXT: ushr v0.8h, v0.8h, #4
452 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
453 %t1 = ashr <8 x i16> %t0, <i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4>
456 define <8 x i16> @test_128_i16_x_8_2032_mask_ashr_5(<8 x i16> %a0) {
457 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_ashr_5:
459 ; CHECK-NEXT: mov w8, #2032
460 ; CHECK-NEXT: dup v1.8h, w8
461 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
462 ; CHECK-NEXT: ushr v0.8h, v0.8h, #5
464 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
465 %t1 = ashr <8 x i16> %t0, <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
468 define <8 x i16> @test_128_i16_x_8_2032_mask_ashr_6(<8 x i16> %a0) {
469 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_ashr_6:
471 ; CHECK-NEXT: mov w8, #2032
472 ; CHECK-NEXT: dup v1.8h, w8
473 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
474 ; CHECK-NEXT: ushr v0.8h, v0.8h, #6
476 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
477 %t1 = ashr <8 x i16> %t0, <i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6>
481 define <8 x i16> @test_128_i16_x_8_65024_mask_ashr_1(<8 x i16> %a0) {
482 ; CHECK-LABEL: test_128_i16_x_8_65024_mask_ashr_1:
484 ; CHECK-NEXT: movi v1.8h, #254, lsl #8
485 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
486 ; CHECK-NEXT: sshr v0.8h, v0.8h, #1
488 %t0 = and <8 x i16> %a0, <i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024>
489 %t1 = ashr <8 x i16> %t0, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
492 define <8 x i16> @test_128_i16_x_8_65024_mask_ashr_8(<8 x i16> %a0) {
493 ; CHECK-LABEL: test_128_i16_x_8_65024_mask_ashr_8:
495 ; CHECK-NEXT: movi v1.8h, #254, lsl #8
496 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
497 ; CHECK-NEXT: sshr v0.8h, v0.8h, #8
499 %t0 = and <8 x i16> %a0, <i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024>
500 %t1 = ashr <8 x i16> %t0, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
503 define <8 x i16> @test_128_i16_x_8_65024_mask_ashr_9(<8 x i16> %a0) {
504 ; CHECK-LABEL: test_128_i16_x_8_65024_mask_ashr_9:
506 ; CHECK-NEXT: sshr v0.8h, v0.8h, #9
508 %t0 = and <8 x i16> %a0, <i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024>
509 %t1 = ashr <8 x i16> %t0, <i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9>
512 define <8 x i16> @test_128_i16_x_8_65024_mask_ashr_10(<8 x i16> %a0) {
513 ; CHECK-LABEL: test_128_i16_x_8_65024_mask_ashr_10:
515 ; CHECK-NEXT: sshr v0.8h, v0.8h, #10
517 %t0 = and <8 x i16> %a0, <i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024>
518 %t1 = ashr <8 x i16> %t0, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
524 define <8 x i16> @test_128_i16_x_8_127_mask_shl_1(<8 x i16> %a0) {
525 ; CHECK-LABEL: test_128_i16_x_8_127_mask_shl_1:
527 ; CHECK-NEXT: movi v1.8h, #127
528 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
529 ; CHECK-NEXT: add v0.8h, v0.8h, v0.8h
531 %t0 = and <8 x i16> %a0, <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
532 %t1 = shl <8 x i16> %t0, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
535 define <8 x i16> @test_128_i16_x_8_127_mask_shl_8(<8 x i16> %a0) {
536 ; CHECK-LABEL: test_128_i16_x_8_127_mask_shl_8:
538 ; CHECK-NEXT: movi v1.8h, #127
539 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
540 ; CHECK-NEXT: shl v0.8h, v0.8h, #8
542 %t0 = and <8 x i16> %a0, <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
543 %t1 = shl <8 x i16> %t0, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
546 define <8 x i16> @test_128_i16_x_8_127_mask_shl_9(<8 x i16> %a0) {
547 ; CHECK-LABEL: test_128_i16_x_8_127_mask_shl_9:
549 ; CHECK-NEXT: shl v0.8h, v0.8h, #9
551 %t0 = and <8 x i16> %a0, <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
552 %t1 = shl <8 x i16> %t0, <i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9>
555 define <8 x i16> @test_128_i16_x_8_127_mask_shl_10(<8 x i16> %a0) {
556 ; CHECK-LABEL: test_128_i16_x_8_127_mask_shl_10:
558 ; CHECK-NEXT: shl v0.8h, v0.8h, #10
560 %t0 = and <8 x i16> %a0, <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
561 %t1 = shl <8 x i16> %t0, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
565 define <8 x i16> @test_128_i16_x_8_2032_mask_shl_3(<8 x i16> %a0) {
566 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_shl_3:
568 ; CHECK-NEXT: mov w8, #2032
569 ; CHECK-NEXT: dup v1.8h, w8
570 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
571 ; CHECK-NEXT: shl v0.8h, v0.8h, #3
573 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
574 %t1 = shl <8 x i16> %t0, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
577 define <8 x i16> @test_128_i16_x_8_2032_mask_shl_4(<8 x i16> %a0) {
578 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_shl_4:
580 ; CHECK-NEXT: mov w8, #2032
581 ; CHECK-NEXT: dup v1.8h, w8
582 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
583 ; CHECK-NEXT: shl v0.8h, v0.8h, #4
585 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
586 %t1 = shl <8 x i16> %t0, <i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4>
589 define <8 x i16> @test_128_i16_x_8_2032_mask_shl_5(<8 x i16> %a0) {
590 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_shl_5:
592 ; CHECK-NEXT: mov w8, #2032
593 ; CHECK-NEXT: dup v1.8h, w8
594 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
595 ; CHECK-NEXT: shl v0.8h, v0.8h, #5
597 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
598 %t1 = shl <8 x i16> %t0, <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
601 define <8 x i16> @test_128_i16_x_8_2032_mask_shl_6(<8 x i16> %a0) {
602 ; CHECK-LABEL: test_128_i16_x_8_2032_mask_shl_6:
604 ; CHECK-NEXT: mov w8, #2032
605 ; CHECK-NEXT: dup v1.8h, w8
606 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
607 ; CHECK-NEXT: shl v0.8h, v0.8h, #6
609 %t0 = and <8 x i16> %a0, <i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032, i16 2032>
610 %t1 = shl <8 x i16> %t0, <i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6>
614 define <8 x i16> @test_128_i16_x_8_65024_mask_shl_1(<8 x i16> %a0) {
615 ; CHECK-LABEL: test_128_i16_x_8_65024_mask_shl_1:
617 ; CHECK-NEXT: movi v1.8h, #254, lsl #8
618 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
619 ; CHECK-NEXT: add v0.8h, v0.8h, v0.8h
621 %t0 = and <8 x i16> %a0, <i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024, i16 65024>
622 %t1 = shl <8 x i16> %t0, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
626 ;------------------------------------------------------------------------------;
627 ; 128-bit vector; 32-bit elements = 4 elements
628 ;------------------------------------------------------------------------------;
632 define <4 x i32> @test_128_i32_x_4_32767_mask_lshr_1(<4 x i32> %a0) {
633 ; CHECK-LABEL: test_128_i32_x_4_32767_mask_lshr_1:
635 ; CHECK-NEXT: movi v1.4s, #127, msl #8
636 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
637 ; CHECK-NEXT: ushr v0.4s, v0.4s, #1
639 %t0 = and <4 x i32> %a0, <i32 32767, i32 32767, i32 32767, i32 32767>
640 %t1 = lshr <4 x i32> %t0, <i32 1, i32 1, i32 1, i32 1>
644 define <4 x i32> @test_128_i32_x_4_8388352_mask_lshr_7(<4 x i32> %a0) {
645 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_lshr_7:
647 ; CHECK-NEXT: mov w8, #8388352
648 ; CHECK-NEXT: dup v1.4s, w8
649 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
650 ; CHECK-NEXT: ushr v0.4s, v0.4s, #7
652 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
653 %t1 = lshr <4 x i32> %t0, <i32 7, i32 7, i32 7, i32 7>
656 define <4 x i32> @test_128_i32_x_4_8388352_mask_lshr_8(<4 x i32> %a0) {
657 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_lshr_8:
659 ; CHECK-NEXT: mov w8, #8388352
660 ; CHECK-NEXT: dup v1.4s, w8
661 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
662 ; CHECK-NEXT: ushr v0.4s, v0.4s, #8
664 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
665 %t1 = lshr <4 x i32> %t0, <i32 8, i32 8, i32 8, i32 8>
668 define <4 x i32> @test_128_i32_x_4_8388352_mask_lshr_9(<4 x i32> %a0) {
669 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_lshr_9:
671 ; CHECK-NEXT: mov w8, #8388352
672 ; CHECK-NEXT: dup v1.4s, w8
673 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
674 ; CHECK-NEXT: ushr v0.4s, v0.4s, #9
676 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
677 %t1 = lshr <4 x i32> %t0, <i32 9, i32 9, i32 9, i32 9>
680 define <4 x i32> @test_128_i32_x_4_8388352_mask_lshr_10(<4 x i32> %a0) {
681 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_lshr_10:
683 ; CHECK-NEXT: mov w8, #8388352
684 ; CHECK-NEXT: dup v1.4s, w8
685 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
686 ; CHECK-NEXT: ushr v0.4s, v0.4s, #10
688 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
689 %t1 = lshr <4 x i32> %t0, <i32 10, i32 10, i32 10, i32 10>
693 define <4 x i32> @test_128_i32_x_4_4294836224_mask_lshr_1(<4 x i32> %a0) {
694 ; CHECK-LABEL: test_128_i32_x_4_4294836224_mask_lshr_1:
696 ; CHECK-NEXT: mvni v1.4s, #1, msl #16
697 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
698 ; CHECK-NEXT: ushr v0.4s, v0.4s, #1
700 %t0 = and <4 x i32> %a0, <i32 4294836224, i32 4294836224, i32 4294836224, i32 4294836224>
701 %t1 = lshr <4 x i32> %t0, <i32 1, i32 1, i32 1, i32 1>
704 define <4 x i32> @test_128_i32_x_4_4294836224_mask_lshr_16(<4 x i32> %a0) {
705 ; CHECK-LABEL: test_128_i32_x_4_4294836224_mask_lshr_16:
707 ; CHECK-NEXT: mvni v1.4s, #1, msl #16
708 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
709 ; CHECK-NEXT: ushr v0.4s, v0.4s, #16
711 %t0 = and <4 x i32> %a0, <i32 4294836224, i32 4294836224, i32 4294836224, i32 4294836224>
712 %t1 = lshr <4 x i32> %t0, <i32 16, i32 16, i32 16, i32 16>
715 define <4 x i32> @test_128_i32_x_4_4294836224_mask_lshr_17(<4 x i32> %a0) {
716 ; CHECK-LABEL: test_128_i32_x_4_4294836224_mask_lshr_17:
718 ; CHECK-NEXT: ushr v0.4s, v0.4s, #17
720 %t0 = and <4 x i32> %a0, <i32 4294836224, i32 4294836224, i32 4294836224, i32 4294836224>
721 %t1 = lshr <4 x i32> %t0, <i32 17, i32 17, i32 17, i32 17>
724 define <4 x i32> @test_128_i32_x_4_4294836224_mask_lshr_18(<4 x i32> %a0) {
725 ; CHECK-LABEL: test_128_i32_x_4_4294836224_mask_lshr_18:
727 ; CHECK-NEXT: ushr v0.4s, v0.4s, #18
729 %t0 = and <4 x i32> %a0, <i32 4294836224, i32 4294836224, i32 4294836224, i32 4294836224>
730 %t1 = lshr <4 x i32> %t0, <i32 18, i32 18, i32 18, i32 18>
736 define <4 x i32> @test_128_i32_x_4_32767_mask_ashr_1(<4 x i32> %a0) {
737 ; CHECK-LABEL: test_128_i32_x_4_32767_mask_ashr_1:
739 ; CHECK-NEXT: movi v1.4s, #127, msl #8
740 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
741 ; CHECK-NEXT: ushr v0.4s, v0.4s, #1
743 %t0 = and <4 x i32> %a0, <i32 32767, i32 32767, i32 32767, i32 32767>
744 %t1 = ashr <4 x i32> %t0, <i32 1, i32 1, i32 1, i32 1>
748 define <4 x i32> @test_128_i32_x_4_8388352_mask_ashr_7(<4 x i32> %a0) {
749 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_ashr_7:
751 ; CHECK-NEXT: mov w8, #8388352
752 ; CHECK-NEXT: dup v1.4s, w8
753 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
754 ; CHECK-NEXT: ushr v0.4s, v0.4s, #7
756 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
757 %t1 = ashr <4 x i32> %t0, <i32 7, i32 7, i32 7, i32 7>
760 define <4 x i32> @test_128_i32_x_4_8388352_mask_ashr_8(<4 x i32> %a0) {
761 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_ashr_8:
763 ; CHECK-NEXT: mov w8, #8388352
764 ; CHECK-NEXT: dup v1.4s, w8
765 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
766 ; CHECK-NEXT: ushr v0.4s, v0.4s, #8
768 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
769 %t1 = ashr <4 x i32> %t0, <i32 8, i32 8, i32 8, i32 8>
772 define <4 x i32> @test_128_i32_x_4_8388352_mask_ashr_9(<4 x i32> %a0) {
773 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_ashr_9:
775 ; CHECK-NEXT: mov w8, #8388352
776 ; CHECK-NEXT: dup v1.4s, w8
777 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
778 ; CHECK-NEXT: ushr v0.4s, v0.4s, #9
780 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
781 %t1 = ashr <4 x i32> %t0, <i32 9, i32 9, i32 9, i32 9>
784 define <4 x i32> @test_128_i32_x_4_8388352_mask_ashr_10(<4 x i32> %a0) {
785 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_ashr_10:
787 ; CHECK-NEXT: mov w8, #8388352
788 ; CHECK-NEXT: dup v1.4s, w8
789 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
790 ; CHECK-NEXT: ushr v0.4s, v0.4s, #10
792 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
793 %t1 = ashr <4 x i32> %t0, <i32 10, i32 10, i32 10, i32 10>
797 define <4 x i32> @test_128_i32_x_4_4294836224_mask_ashr_1(<4 x i32> %a0) {
798 ; CHECK-LABEL: test_128_i32_x_4_4294836224_mask_ashr_1:
800 ; CHECK-NEXT: mvni v1.4s, #1, msl #16
801 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
802 ; CHECK-NEXT: sshr v0.4s, v0.4s, #1
804 %t0 = and <4 x i32> %a0, <i32 4294836224, i32 4294836224, i32 4294836224, i32 4294836224>
805 %t1 = ashr <4 x i32> %t0, <i32 1, i32 1, i32 1, i32 1>
808 define <4 x i32> @test_128_i32_x_4_4294836224_mask_ashr_16(<4 x i32> %a0) {
809 ; CHECK-LABEL: test_128_i32_x_4_4294836224_mask_ashr_16:
811 ; CHECK-NEXT: mvni v1.4s, #1, msl #16
812 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
813 ; CHECK-NEXT: sshr v0.4s, v0.4s, #16
815 %t0 = and <4 x i32> %a0, <i32 4294836224, i32 4294836224, i32 4294836224, i32 4294836224>
816 %t1 = ashr <4 x i32> %t0, <i32 16, i32 16, i32 16, i32 16>
819 define <4 x i32> @test_128_i32_x_4_4294836224_mask_ashr_17(<4 x i32> %a0) {
820 ; CHECK-LABEL: test_128_i32_x_4_4294836224_mask_ashr_17:
822 ; CHECK-NEXT: sshr v0.4s, v0.4s, #17
824 %t0 = and <4 x i32> %a0, <i32 4294836224, i32 4294836224, i32 4294836224, i32 4294836224>
825 %t1 = ashr <4 x i32> %t0, <i32 17, i32 17, i32 17, i32 17>
828 define <4 x i32> @test_128_i32_x_4_4294836224_mask_ashr_18(<4 x i32> %a0) {
829 ; CHECK-LABEL: test_128_i32_x_4_4294836224_mask_ashr_18:
831 ; CHECK-NEXT: sshr v0.4s, v0.4s, #18
833 %t0 = and <4 x i32> %a0, <i32 4294836224, i32 4294836224, i32 4294836224, i32 4294836224>
834 %t1 = ashr <4 x i32> %t0, <i32 18, i32 18, i32 18, i32 18>
840 define <4 x i32> @test_128_i32_x_4_32767_mask_shl_1(<4 x i32> %a0) {
841 ; CHECK-LABEL: test_128_i32_x_4_32767_mask_shl_1:
843 ; CHECK-NEXT: movi v1.4s, #127, msl #8
844 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
845 ; CHECK-NEXT: add v0.4s, v0.4s, v0.4s
847 %t0 = and <4 x i32> %a0, <i32 32767, i32 32767, i32 32767, i32 32767>
848 %t1 = shl <4 x i32> %t0, <i32 1, i32 1, i32 1, i32 1>
851 define <4 x i32> @test_128_i32_x_4_32767_mask_shl_16(<4 x i32> %a0) {
852 ; CHECK-LABEL: test_128_i32_x_4_32767_mask_shl_16:
854 ; CHECK-NEXT: movi v1.4s, #127, msl #8
855 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
856 ; CHECK-NEXT: shl v0.4s, v0.4s, #16
858 %t0 = and <4 x i32> %a0, <i32 32767, i32 32767, i32 32767, i32 32767>
859 %t1 = shl <4 x i32> %t0, <i32 16, i32 16, i32 16, i32 16>
862 define <4 x i32> @test_128_i32_x_4_32767_mask_shl_17(<4 x i32> %a0) {
863 ; CHECK-LABEL: test_128_i32_x_4_32767_mask_shl_17:
865 ; CHECK-NEXT: shl v0.4s, v0.4s, #17
867 %t0 = and <4 x i32> %a0, <i32 32767, i32 32767, i32 32767, i32 32767>
868 %t1 = shl <4 x i32> %t0, <i32 17, i32 17, i32 17, i32 17>
871 define <4 x i32> @test_128_i32_x_4_32767_mask_shl_18(<4 x i32> %a0) {
872 ; CHECK-LABEL: test_128_i32_x_4_32767_mask_shl_18:
874 ; CHECK-NEXT: shl v0.4s, v0.4s, #18
876 %t0 = and <4 x i32> %a0, <i32 32767, i32 32767, i32 32767, i32 32767>
877 %t1 = shl <4 x i32> %t0, <i32 18, i32 18, i32 18, i32 18>
881 define <4 x i32> @test_128_i32_x_4_8388352_mask_shl_7(<4 x i32> %a0) {
882 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_shl_7:
884 ; CHECK-NEXT: mov w8, #8388352
885 ; CHECK-NEXT: dup v1.4s, w8
886 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
887 ; CHECK-NEXT: shl v0.4s, v0.4s, #7
889 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
890 %t1 = shl <4 x i32> %t0, <i32 7, i32 7, i32 7, i32 7>
893 define <4 x i32> @test_128_i32_x_4_8388352_mask_shl_8(<4 x i32> %a0) {
894 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_shl_8:
896 ; CHECK-NEXT: mov w8, #8388352
897 ; CHECK-NEXT: dup v1.4s, w8
898 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
899 ; CHECK-NEXT: shl v0.4s, v0.4s, #8
901 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
902 %t1 = shl <4 x i32> %t0, <i32 8, i32 8, i32 8, i32 8>
905 define <4 x i32> @test_128_i32_x_4_8388352_mask_shl_9(<4 x i32> %a0) {
906 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_shl_9:
908 ; CHECK-NEXT: mov w8, #8388352
909 ; CHECK-NEXT: dup v1.4s, w8
910 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
911 ; CHECK-NEXT: shl v0.4s, v0.4s, #9
913 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
914 %t1 = shl <4 x i32> %t0, <i32 9, i32 9, i32 9, i32 9>
917 define <4 x i32> @test_128_i32_x_4_8388352_mask_shl_10(<4 x i32> %a0) {
918 ; CHECK-LABEL: test_128_i32_x_4_8388352_mask_shl_10:
920 ; CHECK-NEXT: mov w8, #8388352
921 ; CHECK-NEXT: dup v1.4s, w8
922 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
923 ; CHECK-NEXT: shl v0.4s, v0.4s, #10
925 %t0 = and <4 x i32> %a0, <i32 8388352, i32 8388352, i32 8388352, i32 8388352>
926 %t1 = shl <4 x i32> %t0, <i32 10, i32 10, i32 10, i32 10>
930 define <4 x i32> @test_128_i32_x_4_4294836224_mask_shl_1(<4 x i32> %a0) {
931 ; CHECK-LABEL: test_128_i32_x_4_4294836224_mask_shl_1:
933 ; CHECK-NEXT: mvni v1.4s, #1, msl #16
934 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
935 ; CHECK-NEXT: add v0.4s, v0.4s, v0.4s
937 %t0 = and <4 x i32> %a0, <i32 4294836224, i32 4294836224, i32 4294836224, i32 4294836224>
938 %t1 = shl <4 x i32> %t0, <i32 1, i32 1, i32 1, i32 1>
942 ;------------------------------------------------------------------------------;
943 ; 128-bit vector; 64-bit elements = 2 elements
944 ;------------------------------------------------------------------------------;
948 define <2 x i64> @test_128_i64_x_2_2147483647_mask_lshr_1(<2 x i64> %a0) {
949 ; CHECK-LABEL: test_128_i64_x_2_2147483647_mask_lshr_1:
951 ; CHECK-NEXT: mov w8, #2147483647
952 ; CHECK-NEXT: dup v1.2d, x8
953 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
954 ; CHECK-NEXT: ushr v0.2d, v0.2d, #1
956 %t0 = and <2 x i64> %a0, <i64 2147483647, i64 2147483647>
957 %t1 = lshr <2 x i64> %t0, <i64 1, i64 1>
961 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_lshr_15(<2 x i64> %a0) {
962 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_lshr_15:
964 ; CHECK-NEXT: mov x8, #140737488289792
965 ; CHECK-NEXT: dup v1.2d, x8
966 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
967 ; CHECK-NEXT: ushr v0.2d, v0.2d, #15
969 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
970 %t1 = lshr <2 x i64> %t0, <i64 15, i64 15>
973 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_lshr_16(<2 x i64> %a0) {
974 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_lshr_16:
976 ; CHECK-NEXT: mov x8, #140737488289792
977 ; CHECK-NEXT: dup v1.2d, x8
978 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
979 ; CHECK-NEXT: ushr v0.2d, v0.2d, #16
981 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
982 %t1 = lshr <2 x i64> %t0, <i64 16, i64 16>
985 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_lshr_17(<2 x i64> %a0) {
986 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_lshr_17:
988 ; CHECK-NEXT: mov x8, #140737488289792
989 ; CHECK-NEXT: dup v1.2d, x8
990 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
991 ; CHECK-NEXT: ushr v0.2d, v0.2d, #17
993 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
994 %t1 = lshr <2 x i64> %t0, <i64 17, i64 17>
997 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_lshr_18(<2 x i64> %a0) {
998 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_lshr_18:
1000 ; CHECK-NEXT: mov x8, #140737488289792
1001 ; CHECK-NEXT: dup v1.2d, x8
1002 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1003 ; CHECK-NEXT: ushr v0.2d, v0.2d, #18
1005 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
1006 %t1 = lshr <2 x i64> %t0, <i64 18, i64 18>
1010 define <2 x i64> @test_128_i64_x_2_18446744065119617024_mask_lshr_1(<2 x i64> %a0) {
1011 ; CHECK-LABEL: test_128_i64_x_2_18446744065119617024_mask_lshr_1:
1013 ; CHECK-NEXT: mov x8, #-8589934592
1014 ; CHECK-NEXT: dup v1.2d, x8
1015 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1016 ; CHECK-NEXT: ushr v0.2d, v0.2d, #1
1018 %t0 = and <2 x i64> %a0, <i64 18446744065119617024, i64 18446744065119617024>
1019 %t1 = lshr <2 x i64> %t0, <i64 1, i64 1>
1022 define <2 x i64> @test_128_i64_x_2_18446744065119617024_mask_lshr_32(<2 x i64> %a0) {
1023 ; CHECK-LABEL: test_128_i64_x_2_18446744065119617024_mask_lshr_32:
1025 ; CHECK-NEXT: mov x8, #-8589934592
1026 ; CHECK-NEXT: dup v1.2d, x8
1027 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1028 ; CHECK-NEXT: ushr v0.2d, v0.2d, #32
1030 %t0 = and <2 x i64> %a0, <i64 18446744065119617024, i64 18446744065119617024>
1031 %t1 = lshr <2 x i64> %t0, <i64 32, i64 32>
1034 define <2 x i64> @test_128_i64_x_2_18446744065119617024_mask_lshr_33(<2 x i64> %a0) {
1035 ; CHECK-LABEL: test_128_i64_x_2_18446744065119617024_mask_lshr_33:
1037 ; CHECK-NEXT: ushr v0.2d, v0.2d, #33
1039 %t0 = and <2 x i64> %a0, <i64 18446744065119617024, i64 18446744065119617024>
1040 %t1 = lshr <2 x i64> %t0, <i64 33, i64 33>
1043 define <2 x i64> @test_128_i64_x_2_18446744065119617024_mask_lshr_34(<2 x i64> %a0) {
1044 ; CHECK-LABEL: test_128_i64_x_2_18446744065119617024_mask_lshr_34:
1046 ; CHECK-NEXT: ushr v0.2d, v0.2d, #34
1048 %t0 = and <2 x i64> %a0, <i64 18446744065119617024, i64 18446744065119617024>
1049 %t1 = lshr <2 x i64> %t0, <i64 34, i64 34>
1055 define <2 x i64> @test_128_i64_x_2_2147483647_mask_ashr_1(<2 x i64> %a0) {
1056 ; CHECK-LABEL: test_128_i64_x_2_2147483647_mask_ashr_1:
1058 ; CHECK-NEXT: mov w8, #2147483647
1059 ; CHECK-NEXT: dup v1.2d, x8
1060 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1061 ; CHECK-NEXT: ushr v0.2d, v0.2d, #1
1063 %t0 = and <2 x i64> %a0, <i64 2147483647, i64 2147483647>
1064 %t1 = ashr <2 x i64> %t0, <i64 1, i64 1>
1068 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_ashr_15(<2 x i64> %a0) {
1069 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_ashr_15:
1071 ; CHECK-NEXT: mov x8, #140737488289792
1072 ; CHECK-NEXT: dup v1.2d, x8
1073 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1074 ; CHECK-NEXT: ushr v0.2d, v0.2d, #15
1076 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
1077 %t1 = ashr <2 x i64> %t0, <i64 15, i64 15>
1080 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_ashr_16(<2 x i64> %a0) {
1081 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_ashr_16:
1083 ; CHECK-NEXT: mov x8, #140737488289792
1084 ; CHECK-NEXT: dup v1.2d, x8
1085 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1086 ; CHECK-NEXT: ushr v0.2d, v0.2d, #16
1088 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
1089 %t1 = ashr <2 x i64> %t0, <i64 16, i64 16>
1092 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_ashr_17(<2 x i64> %a0) {
1093 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_ashr_17:
1095 ; CHECK-NEXT: mov x8, #140737488289792
1096 ; CHECK-NEXT: dup v1.2d, x8
1097 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1098 ; CHECK-NEXT: ushr v0.2d, v0.2d, #17
1100 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
1101 %t1 = ashr <2 x i64> %t0, <i64 17, i64 17>
1104 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_ashr_18(<2 x i64> %a0) {
1105 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_ashr_18:
1107 ; CHECK-NEXT: mov x8, #140737488289792
1108 ; CHECK-NEXT: dup v1.2d, x8
1109 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1110 ; CHECK-NEXT: ushr v0.2d, v0.2d, #18
1112 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
1113 %t1 = ashr <2 x i64> %t0, <i64 18, i64 18>
1117 define <2 x i64> @test_128_i64_x_2_18446744065119617024_mask_ashr_1(<2 x i64> %a0) {
1118 ; CHECK-LABEL: test_128_i64_x_2_18446744065119617024_mask_ashr_1:
1120 ; CHECK-NEXT: mov x8, #-8589934592
1121 ; CHECK-NEXT: dup v1.2d, x8
1122 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1123 ; CHECK-NEXT: sshr v0.2d, v0.2d, #1
1125 %t0 = and <2 x i64> %a0, <i64 18446744065119617024, i64 18446744065119617024>
1126 %t1 = ashr <2 x i64> %t0, <i64 1, i64 1>
1129 define <2 x i64> @test_128_i64_x_2_18446744065119617024_mask_ashr_32(<2 x i64> %a0) {
1130 ; CHECK-LABEL: test_128_i64_x_2_18446744065119617024_mask_ashr_32:
1132 ; CHECK-NEXT: mov x8, #-8589934592
1133 ; CHECK-NEXT: dup v1.2d, x8
1134 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1135 ; CHECK-NEXT: sshr v0.2d, v0.2d, #32
1137 %t0 = and <2 x i64> %a0, <i64 18446744065119617024, i64 18446744065119617024>
1138 %t1 = ashr <2 x i64> %t0, <i64 32, i64 32>
1141 define <2 x i64> @test_128_i64_x_2_18446744065119617024_mask_ashr_33(<2 x i64> %a0) {
1142 ; CHECK-LABEL: test_128_i64_x_2_18446744065119617024_mask_ashr_33:
1144 ; CHECK-NEXT: sshr v0.2d, v0.2d, #33
1146 %t0 = and <2 x i64> %a0, <i64 18446744065119617024, i64 18446744065119617024>
1147 %t1 = ashr <2 x i64> %t0, <i64 33, i64 33>
1150 define <2 x i64> @test_128_i64_x_2_18446744065119617024_mask_ashr_34(<2 x i64> %a0) {
1151 ; CHECK-LABEL: test_128_i64_x_2_18446744065119617024_mask_ashr_34:
1153 ; CHECK-NEXT: sshr v0.2d, v0.2d, #34
1155 %t0 = and <2 x i64> %a0, <i64 18446744065119617024, i64 18446744065119617024>
1156 %t1 = ashr <2 x i64> %t0, <i64 34, i64 34>
1162 define <2 x i64> @test_128_i64_x_2_2147483647_mask_shl_1(<2 x i64> %a0) {
1163 ; CHECK-LABEL: test_128_i64_x_2_2147483647_mask_shl_1:
1165 ; CHECK-NEXT: mov w8, #2147483647
1166 ; CHECK-NEXT: dup v1.2d, x8
1167 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1168 ; CHECK-NEXT: add v0.2d, v0.2d, v0.2d
1170 %t0 = and <2 x i64> %a0, <i64 2147483647, i64 2147483647>
1171 %t1 = shl <2 x i64> %t0, <i64 1, i64 1>
1174 define <2 x i64> @test_128_i64_x_2_2147483647_mask_shl_32(<2 x i64> %a0) {
1175 ; CHECK-LABEL: test_128_i64_x_2_2147483647_mask_shl_32:
1177 ; CHECK-NEXT: mov w8, #2147483647
1178 ; CHECK-NEXT: dup v1.2d, x8
1179 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1180 ; CHECK-NEXT: shl v0.2d, v0.2d, #32
1182 %t0 = and <2 x i64> %a0, <i64 2147483647, i64 2147483647>
1183 %t1 = shl <2 x i64> %t0, <i64 32, i64 32>
1186 define <2 x i64> @test_128_i64_x_2_2147483647_mask_shl_33(<2 x i64> %a0) {
1187 ; CHECK-LABEL: test_128_i64_x_2_2147483647_mask_shl_33:
1189 ; CHECK-NEXT: shl v0.2d, v0.2d, #33
1191 %t0 = and <2 x i64> %a0, <i64 2147483647, i64 2147483647>
1192 %t1 = shl <2 x i64> %t0, <i64 33, i64 33>
1195 define <2 x i64> @test_128_i64_x_2_2147483647_mask_shl_34(<2 x i64> %a0) {
1196 ; CHECK-LABEL: test_128_i64_x_2_2147483647_mask_shl_34:
1198 ; CHECK-NEXT: shl v0.2d, v0.2d, #34
1200 %t0 = and <2 x i64> %a0, <i64 2147483647, i64 2147483647>
1201 %t1 = shl <2 x i64> %t0, <i64 34, i64 34>
1205 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_shl_15(<2 x i64> %a0) {
1206 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_shl_15:
1208 ; CHECK-NEXT: mov x8, #140737488289792
1209 ; CHECK-NEXT: dup v1.2d, x8
1210 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1211 ; CHECK-NEXT: shl v0.2d, v0.2d, #15
1213 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
1214 %t1 = shl <2 x i64> %t0, <i64 15, i64 15>
1217 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_shl_16(<2 x i64> %a0) {
1218 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_shl_16:
1220 ; CHECK-NEXT: mov x8, #140737488289792
1221 ; CHECK-NEXT: dup v1.2d, x8
1222 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1223 ; CHECK-NEXT: shl v0.2d, v0.2d, #16
1225 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
1226 %t1 = shl <2 x i64> %t0, <i64 16, i64 16>
1229 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_shl_17(<2 x i64> %a0) {
1230 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_shl_17:
1232 ; CHECK-NEXT: mov x8, #140737488289792
1233 ; CHECK-NEXT: dup v1.2d, x8
1234 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1235 ; CHECK-NEXT: shl v0.2d, v0.2d, #17
1237 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
1238 %t1 = shl <2 x i64> %t0, <i64 17, i64 17>
1241 define <2 x i64> @test_128_i64_x_2_140737488289792_mask_shl_18(<2 x i64> %a0) {
1242 ; CHECK-LABEL: test_128_i64_x_2_140737488289792_mask_shl_18:
1244 ; CHECK-NEXT: mov x8, #140737488289792
1245 ; CHECK-NEXT: dup v1.2d, x8
1246 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1247 ; CHECK-NEXT: shl v0.2d, v0.2d, #18
1249 %t0 = and <2 x i64> %a0, <i64 140737488289792, i64 140737488289792>
1250 %t1 = shl <2 x i64> %t0, <i64 18, i64 18>
1254 define <2 x i64> @test_128_i64_x_2_18446744065119617024_mask_shl_1(<2 x i64> %a0) {
1255 ; CHECK-LABEL: test_128_i64_x_2_18446744065119617024_mask_shl_1:
1257 ; CHECK-NEXT: mov x8, #-8589934592
1258 ; CHECK-NEXT: dup v1.2d, x8
1259 ; CHECK-NEXT: and v0.16b, v0.16b, v1.16b
1260 ; CHECK-NEXT: add v0.2d, v0.2d, v0.2d
1262 %t0 = and <2 x i64> %a0, <i64 18446744065119617024, i64 18446744065119617024>
1263 %t1 = shl <2 x i64> %t0, <i64 1, i64 1>