1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+neon | FileCheck %s
4 define <8 x i8> @test_vext_s8(<8 x i8> %a, <8 x i8> %b) {
5 ; CHECK-LABEL: test_vext_s8:
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #2
10 %vext = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9>
14 define <4 x i16> @test_vext_s16(<4 x i16> %a, <4 x i16> %b) {
15 ; CHECK-LABEL: test_vext_s16:
16 ; CHECK: // %bb.0: // %entry
17 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #6
20 %vext = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
24 define <2 x i32> @test_vext_s32(<2 x i32> %a, <2 x i32> %b) {
25 ; CHECK-LABEL: test_vext_s32:
26 ; CHECK: // %bb.0: // %entry
27 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #4
30 %vext = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 2>
34 define <1 x i64> @test_vext_s64(<1 x i64> %a, <1 x i64> %b) {
35 ; CHECK-LABEL: test_vext_s64:
36 ; CHECK: // %bb.0: // %entry
39 %vext = shufflevector <1 x i64> %a, <1 x i64> %b, <1 x i32> <i32 0>
43 define <16 x i8> @test_vextq_s8(<16 x i8> %a, <16 x i8> %b) {
44 ; CHECK-LABEL: test_vextq_s8:
45 ; CHECK: // %bb.0: // %entry
46 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #2
49 %vext = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17>
53 define <8 x i16> @test_vextq_s16(<8 x i16> %a, <8 x i16> %b) {
54 ; CHECK-LABEL: test_vextq_s16:
55 ; CHECK: // %bb.0: // %entry
56 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #6
59 %vext = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10>
63 define <4 x i32> @test_vextq_s32(<4 x i32> %a, <4 x i32> %b) {
64 ; CHECK-LABEL: test_vextq_s32:
65 ; CHECK: // %bb.0: // %entry
66 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #4
69 %vext = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 2, i32 3, i32 4>
73 define <2 x i64> @test_vextq_s64(<2 x i64> %a, <2 x i64> %b) {
74 ; CHECK-LABEL: test_vextq_s64:
75 ; CHECK: // %bb.0: // %entry
76 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #8
79 %vext = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 2>
83 define <8 x i8> @test_vext_u8(<8 x i8> %a, <8 x i8> %b) {
84 ; CHECK-LABEL: test_vext_u8:
85 ; CHECK: // %bb.0: // %entry
86 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #2
89 %vext = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9>
93 define <4 x i16> @test_vext_u16(<4 x i16> %a, <4 x i16> %b) {
94 ; CHECK-LABEL: test_vext_u16:
95 ; CHECK: // %bb.0: // %entry
96 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #6
99 %vext = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
103 define <2 x i32> @test_vext_u32(<2 x i32> %a, <2 x i32> %b) {
104 ; CHECK-LABEL: test_vext_u32:
105 ; CHECK: // %bb.0: // %entry
106 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #4
109 %vext = shufflevector <2 x i32> %a, <2 x i32> %b, <2 x i32> <i32 1, i32 2>
113 define <1 x i64> @test_vext_u64(<1 x i64> %a, <1 x i64> %b) {
114 ; CHECK-LABEL: test_vext_u64:
115 ; CHECK: // %bb.0: // %entry
118 %vext = shufflevector <1 x i64> %a, <1 x i64> %b, <1 x i32> <i32 0>
122 define <16 x i8> @test_vextq_u8(<16 x i8> %a, <16 x i8> %b) {
123 ; CHECK-LABEL: test_vextq_u8:
124 ; CHECK: // %bb.0: // %entry
125 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #2
128 %vext = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17>
132 define <8 x i16> @test_vextq_u16(<8 x i16> %a, <8 x i16> %b) {
133 ; CHECK-LABEL: test_vextq_u16:
134 ; CHECK: // %bb.0: // %entry
135 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #6
138 %vext = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10>
142 define <4 x i32> @test_vextq_u32(<4 x i32> %a, <4 x i32> %b) {
143 ; CHECK-LABEL: test_vextq_u32:
144 ; CHECK: // %bb.0: // %entry
145 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #4
148 %vext = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 2, i32 3, i32 4>
152 define <2 x i64> @test_vextq_u64(<2 x i64> %a, <2 x i64> %b) {
153 ; CHECK-LABEL: test_vextq_u64:
154 ; CHECK: // %bb.0: // %entry
155 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #8
158 %vext = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 2>
162 define <2 x float> @test_vext_f32(<2 x float> %a, <2 x float> %b) {
163 ; CHECK-LABEL: test_vext_f32:
164 ; CHECK: // %bb.0: // %entry
165 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #4
168 %vext = shufflevector <2 x float> %a, <2 x float> %b, <2 x i32> <i32 1, i32 2>
169 ret <2 x float> %vext
172 define <1 x double> @test_vext_f64(<1 x double> %a, <1 x double> %b) {
173 ; CHECK-LABEL: test_vext_f64:
174 ; CHECK: // %bb.0: // %entry
177 %vext = shufflevector <1 x double> %a, <1 x double> %b, <1 x i32> <i32 0>
178 ret <1 x double> %vext
181 define <4 x float> @test_vextq_f32(<4 x float> %a, <4 x float> %b) {
182 ; CHECK-LABEL: test_vextq_f32:
183 ; CHECK: // %bb.0: // %entry
184 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #4
187 %vext = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 1, i32 2, i32 3, i32 4>
188 ret <4 x float> %vext
191 define <2 x double> @test_vextq_f64(<2 x double> %a, <2 x double> %b) {
192 ; CHECK-LABEL: test_vextq_f64:
193 ; CHECK: // %bb.0: // %entry
194 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #8
197 %vext = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 1, i32 2>
198 ret <2 x double> %vext
201 define <8 x i8> @test_vext_p8(<8 x i8> %a, <8 x i8> %b) {
202 ; CHECK-LABEL: test_vext_p8:
203 ; CHECK: // %bb.0: // %entry
204 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #2
207 %vext = shufflevector <8 x i8> %a, <8 x i8> %b, <8 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9>
211 define <4 x i16> @test_vext_p16(<4 x i16> %a, <4 x i16> %b) {
212 ; CHECK-LABEL: test_vext_p16:
213 ; CHECK: // %bb.0: // %entry
214 ; CHECK-NEXT: ext v0.8b, v0.8b, v1.8b, #6
217 %vext = shufflevector <4 x i16> %a, <4 x i16> %b, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
221 define <16 x i8> @test_vextq_p8(<16 x i8> %a, <16 x i8> %b) {
222 ; CHECK-LABEL: test_vextq_p8:
223 ; CHECK: // %bb.0: // %entry
224 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #2
227 %vext = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17>
231 define <8 x i16> @test_vextq_p16(<8 x i16> %a, <8 x i16> %b) {
232 ; CHECK-LABEL: test_vextq_p16:
233 ; CHECK: // %bb.0: // %entry
234 ; CHECK-NEXT: ext v0.16b, v0.16b, v1.16b, #6
237 %vext = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10>
241 define <8 x i8> @test_undef_vext_s8(<8 x i8> %a) {
242 ; CHECK-LABEL: test_undef_vext_s8:
243 ; CHECK: // %bb.0: // %entry
244 ; CHECK-NEXT: ext v0.8b, v0.8b, v0.8b, #2
247 %vext = shufflevector <8 x i8> %a, <8 x i8> undef, <8 x i32> <i32 10, i32 10, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9>
251 define <16 x i8> @test_undef_vextq_s8(<16 x i8> %a) {
252 ; CHECK-LABEL: test_undef_vextq_s8:
253 ; CHECK: // %bb.0: // %entry
254 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #6
257 %vext = shufflevector <16 x i8> %a, <16 x i8> undef, <16 x i32> <i32 20, i32 20, i32 20, i32 20, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 20, i32 20, i32 20, i32 20, i32 20>
261 define <4 x i16> @test_undef_vext_s16(<4 x i16> %a) {
262 ; CHECK-LABEL: test_undef_vext_s16:
263 ; CHECK: // %bb.0: // %entry
264 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
265 ; CHECK-NEXT: dup v0.2s, v0.s[1]
268 %vext = shufflevector <4 x i16> %a, <4 x i16> undef, <4 x i32> <i32 2, i32 3, i32 4, i32 5>
272 define <8 x i16> @test_undef_vextq_s16(<8 x i16> %a) {
273 ; CHECK-LABEL: test_undef_vextq_s16:
274 ; CHECK: // %bb.0: // %entry
275 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #6
278 %vext = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 10, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10>