1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+neon -fp-contract=fast -aarch64-enable-sink-fold=true | FileCheck %s --check-prefix=CHECK-SDAG
3 ; RUN: llc < %s -global-isel -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+neon -fp-contract=fast -aarch64-enable-sink-fold=true | FileCheck %s --check-prefix=CHECK-GISEL
5 define <4 x i8> @test_varidx_extract_v8s8(<8 x i8> %x, i32 %idx) {
6 ; CHECK-SDAG-LABEL: test_varidx_extract_v8s8:
7 ; CHECK-SDAG: // %bb.0:
8 ; CHECK-SDAG-NEXT: sub sp, sp, #16
9 ; CHECK-SDAG-NEXT: .cfi_def_cfa_offset 16
10 ; CHECK-SDAG-NEXT: add x8, sp, #8
11 ; CHECK-SDAG-NEXT: // kill: def $w0 killed $w0 def $x0
12 ; CHECK-SDAG-NEXT: // kill: def $d0 killed $d0 def $q0
13 ; CHECK-SDAG-NEXT: str d0, [sp, #8]
14 ; CHECK-SDAG-NEXT: umov w9, v0.b[1]
15 ; CHECK-SDAG-NEXT: bfxil x8, x0, #0, #3
16 ; CHECK-SDAG-NEXT: ld1 { v1.b }[0], [x8]
17 ; CHECK-SDAG-NEXT: umov w8, v0.b[2]
18 ; CHECK-SDAG-NEXT: mov v1.h[1], w9
19 ; CHECK-SDAG-NEXT: umov w9, v0.b[3]
20 ; CHECK-SDAG-NEXT: mov v1.h[2], w8
21 ; CHECK-SDAG-NEXT: mov v1.h[3], w9
22 ; CHECK-SDAG-NEXT: fmov d0, d1
23 ; CHECK-SDAG-NEXT: add sp, sp, #16
24 ; CHECK-SDAG-NEXT: ret
26 ; CHECK-GISEL-LABEL: test_varidx_extract_v8s8:
27 ; CHECK-GISEL: // %bb.0:
28 ; CHECK-GISEL-NEXT: sub sp, sp, #16
29 ; CHECK-GISEL-NEXT: .cfi_def_cfa_offset 16
30 ; CHECK-GISEL-NEXT: mov w9, w0
31 ; CHECK-GISEL-NEXT: // kill: def $d0 killed $d0 def $q0
32 ; CHECK-GISEL-NEXT: mov b1, v0.b[1]
33 ; CHECK-GISEL-NEXT: add x8, sp, #8
34 ; CHECK-GISEL-NEXT: and x9, x9, #0x7
35 ; CHECK-GISEL-NEXT: str d0, [sp, #8]
36 ; CHECK-GISEL-NEXT: mov b3, v0.b[2]
37 ; CHECK-GISEL-NEXT: lsl x10, x9, #1
38 ; CHECK-GISEL-NEXT: mov b0, v0.b[3]
39 ; CHECK-GISEL-NEXT: sub x9, x10, x9
40 ; CHECK-GISEL-NEXT: ldr b2, [x8, x9]
41 ; CHECK-GISEL-NEXT: mov v2.b[1], v1.b[0]
42 ; CHECK-GISEL-NEXT: mov v2.b[2], v3.b[0]
43 ; CHECK-GISEL-NEXT: mov v2.b[3], v0.b[0]
44 ; CHECK-GISEL-NEXT: ushll v0.8h, v2.8b, #0
45 ; CHECK-GISEL-NEXT: // kill: def $d0 killed $d0 killed $q0
46 ; CHECK-GISEL-NEXT: add sp, sp, #16
47 ; CHECK-GISEL-NEXT: ret
48 %tmp = extractelement <8 x i8> %x, i32 %idx
49 %tmp2 = insertelement <4 x i8> undef, i8 %tmp, i32 0
50 %tmp3 = extractelement <8 x i8> %x, i32 1
51 %tmp4 = insertelement <4 x i8> %tmp2, i8 %tmp3, i32 1
52 %tmp5 = extractelement <8 x i8> %x, i32 2
53 %tmp6 = insertelement <4 x i8> %tmp4, i8 %tmp5, i32 2
54 %tmp7 = extractelement <8 x i8> %x, i32 3
55 %tmp8 = insertelement <4 x i8> %tmp6, i8 %tmp7, i32 3
59 define <8 x i8> @test_varidx_extract_v16s8(<16 x i8> %x, i32 %idx) {
60 ; CHECK-SDAG-LABEL: test_varidx_extract_v16s8:
61 ; CHECK-SDAG: // %bb.0:
62 ; CHECK-SDAG-NEXT: sub sp, sp, #16
63 ; CHECK-SDAG-NEXT: .cfi_def_cfa_offset 16
64 ; CHECK-SDAG-NEXT: mov x8, sp
65 ; CHECK-SDAG-NEXT: // kill: def $w0 killed $w0 def $x0
66 ; CHECK-SDAG-NEXT: str q0, [sp]
67 ; CHECK-SDAG-NEXT: bfxil x8, x0, #0, #4
68 ; CHECK-SDAG-NEXT: ldr b1, [x8]
69 ; CHECK-SDAG-NEXT: mov v1.b[1], v0.b[1]
70 ; CHECK-SDAG-NEXT: mov v1.b[2], v0.b[2]
71 ; CHECK-SDAG-NEXT: mov v1.b[3], v0.b[3]
72 ; CHECK-SDAG-NEXT: mov v1.b[4], v0.b[4]
73 ; CHECK-SDAG-NEXT: mov v1.b[5], v0.b[5]
74 ; CHECK-SDAG-NEXT: mov v1.b[6], v0.b[6]
75 ; CHECK-SDAG-NEXT: mov v1.b[7], v0.b[7]
76 ; CHECK-SDAG-NEXT: fmov d0, d1
77 ; CHECK-SDAG-NEXT: add sp, sp, #16
78 ; CHECK-SDAG-NEXT: ret
80 ; CHECK-GISEL-LABEL: test_varidx_extract_v16s8:
81 ; CHECK-GISEL: // %bb.0:
82 ; CHECK-GISEL-NEXT: sub sp, sp, #16
83 ; CHECK-GISEL-NEXT: .cfi_def_cfa_offset 16
84 ; CHECK-GISEL-NEXT: mov w9, w0
85 ; CHECK-GISEL-NEXT: mov b2, v0.b[1]
86 ; CHECK-GISEL-NEXT: mov x8, sp
87 ; CHECK-GISEL-NEXT: and x9, x9, #0xf
88 ; CHECK-GISEL-NEXT: str q0, [sp]
89 ; CHECK-GISEL-NEXT: mov b3, v0.b[2]
90 ; CHECK-GISEL-NEXT: lsl x10, x9, #1
91 ; CHECK-GISEL-NEXT: sub x9, x10, x9
92 ; CHECK-GISEL-NEXT: ldr b1, [x8, x9]
93 ; CHECK-GISEL-NEXT: mov v1.b[1], v2.b[0]
94 ; CHECK-GISEL-NEXT: mov b2, v0.b[3]
95 ; CHECK-GISEL-NEXT: mov v1.b[2], v3.b[0]
96 ; CHECK-GISEL-NEXT: mov b3, v0.b[4]
97 ; CHECK-GISEL-NEXT: mov v1.b[3], v2.b[0]
98 ; CHECK-GISEL-NEXT: mov b2, v0.b[5]
99 ; CHECK-GISEL-NEXT: mov v1.b[4], v3.b[0]
100 ; CHECK-GISEL-NEXT: mov b3, v0.b[6]
101 ; CHECK-GISEL-NEXT: mov b0, v0.b[7]
102 ; CHECK-GISEL-NEXT: mov v1.b[5], v2.b[0]
103 ; CHECK-GISEL-NEXT: mov v1.b[6], v3.b[0]
104 ; CHECK-GISEL-NEXT: mov v1.b[7], v0.b[0]
105 ; CHECK-GISEL-NEXT: fmov d0, d1
106 ; CHECK-GISEL-NEXT: add sp, sp, #16
107 ; CHECK-GISEL-NEXT: ret
108 %tmp = extractelement <16 x i8> %x, i32 %idx
109 %tmp2 = insertelement <8 x i8> undef, i8 %tmp, i32 0
110 %tmp3 = extractelement <16 x i8> %x, i32 1
111 %tmp4 = insertelement <8 x i8> %tmp2, i8 %tmp3, i32 1
112 %tmp5 = extractelement <16 x i8> %x, i32 2
113 %tmp6 = insertelement <8 x i8> %tmp4, i8 %tmp5, i32 2
114 %tmp7 = extractelement <16 x i8> %x, i32 3
115 %tmp8 = insertelement <8 x i8> %tmp6, i8 %tmp7, i32 3
116 %tmp9 = extractelement <16 x i8> %x, i32 4
117 %tmp10 = insertelement <8 x i8> %tmp8, i8 %tmp9, i32 4
118 %tmp11 = extractelement <16 x i8> %x, i32 5
119 %tmp12 = insertelement <8 x i8> %tmp10, i8 %tmp11, i32 5
120 %tmp13 = extractelement <16 x i8> %x, i32 6
121 %tmp14 = insertelement <8 x i8> %tmp12, i8 %tmp13, i32 6
122 %tmp15 = extractelement <16 x i8> %x, i32 7
123 %tmp16 = insertelement <8 x i8> %tmp14, i8 %tmp15, i32 7
127 define i16 @test_varidx_extract_v2s16(<2 x i16> %x, i32 %idx) {
128 ; CHECK-SDAG-LABEL: test_varidx_extract_v2s16:
129 ; CHECK-SDAG: // %bb.0:
130 ; CHECK-SDAG-NEXT: sub sp, sp, #16
131 ; CHECK-SDAG-NEXT: .cfi_def_cfa_offset 16
132 ; CHECK-SDAG-NEXT: add x8, sp, #8
133 ; CHECK-SDAG-NEXT: // kill: def $w0 killed $w0 def $x0
134 ; CHECK-SDAG-NEXT: str d0, [sp, #8]
135 ; CHECK-SDAG-NEXT: bfi x8, x0, #2, #1
136 ; CHECK-SDAG-NEXT: ldr w0, [x8]
137 ; CHECK-SDAG-NEXT: add sp, sp, #16
138 ; CHECK-SDAG-NEXT: ret
140 ; CHECK-GISEL-LABEL: test_varidx_extract_v2s16:
141 ; CHECK-GISEL: // %bb.0:
142 ; CHECK-GISEL-NEXT: sub sp, sp, #16
143 ; CHECK-GISEL-NEXT: .cfi_def_cfa_offset 16
144 ; CHECK-GISEL-NEXT: // kill: def $d0 killed $d0 def $q0
145 ; CHECK-GISEL-NEXT: mov s1, v0.s[1]
146 ; CHECK-GISEL-NEXT: mov w9, w0
147 ; CHECK-GISEL-NEXT: add x8, sp, #12
148 ; CHECK-GISEL-NEXT: str h0, [sp, #12]
149 ; CHECK-GISEL-NEXT: and x9, x9, #0x1
150 ; CHECK-GISEL-NEXT: str h1, [sp, #14]
151 ; CHECK-GISEL-NEXT: ldrh w0, [x8, x9, lsl #1]
152 ; CHECK-GISEL-NEXT: add sp, sp, #16
153 ; CHECK-GISEL-NEXT: ret
154 %tmp = extractelement <2 x i16> %x, i32 %idx
158 define <2 x i16> @test_varidx_extract_v4s16(<4 x i16> %x, i32 %idx) {
159 ; CHECK-SDAG-LABEL: test_varidx_extract_v4s16:
160 ; CHECK-SDAG: // %bb.0:
161 ; CHECK-SDAG-NEXT: sub sp, sp, #16
162 ; CHECK-SDAG-NEXT: .cfi_def_cfa_offset 16
163 ; CHECK-SDAG-NEXT: add x8, sp, #8
164 ; CHECK-SDAG-NEXT: // kill: def $w0 killed $w0 def $x0
165 ; CHECK-SDAG-NEXT: // kill: def $d0 killed $d0 def $q0
166 ; CHECK-SDAG-NEXT: str d0, [sp, #8]
167 ; CHECK-SDAG-NEXT: umov w9, v0.h[1]
168 ; CHECK-SDAG-NEXT: bfi x8, x0, #1, #2
169 ; CHECK-SDAG-NEXT: ld1 { v0.h }[0], [x8]
170 ; CHECK-SDAG-NEXT: mov v0.s[1], w9
171 ; CHECK-SDAG-NEXT: // kill: def $d0 killed $d0 killed $q0
172 ; CHECK-SDAG-NEXT: add sp, sp, #16
173 ; CHECK-SDAG-NEXT: ret
175 ; CHECK-GISEL-LABEL: test_varidx_extract_v4s16:
176 ; CHECK-GISEL: // %bb.0:
177 ; CHECK-GISEL-NEXT: sub sp, sp, #16
178 ; CHECK-GISEL-NEXT: .cfi_def_cfa_offset 16
179 ; CHECK-GISEL-NEXT: // kill: def $d0 killed $d0 def $q0
180 ; CHECK-GISEL-NEXT: mov w9, w0
181 ; CHECK-GISEL-NEXT: mov h1, v0.h[1]
182 ; CHECK-GISEL-NEXT: add x8, sp, #8
183 ; CHECK-GISEL-NEXT: str d0, [sp, #8]
184 ; CHECK-GISEL-NEXT: and x9, x9, #0x3
185 ; CHECK-GISEL-NEXT: ldr h0, [x8, x9, lsl #1]
186 ; CHECK-GISEL-NEXT: mov v0.h[1], v1.h[0]
187 ; CHECK-GISEL-NEXT: ushll v0.4s, v0.4h, #0
188 ; CHECK-GISEL-NEXT: // kill: def $d0 killed $d0 killed $q0
189 ; CHECK-GISEL-NEXT: add sp, sp, #16
190 ; CHECK-GISEL-NEXT: ret
191 %tmp = extractelement <4 x i16> %x, i32 %idx
192 %tmp2 = insertelement <2 x i16> undef, i16 %tmp, i32 0
193 %tmp3 = extractelement <4 x i16> %x, i32 1
194 %tmp4 = insertelement <2 x i16> %tmp2, i16 %tmp3, i32 1
198 define <4 x i16> @test_varidx_extract_v8s16(<8 x i16> %x, i32 %idx) {
199 ; CHECK-SDAG-LABEL: test_varidx_extract_v8s16:
200 ; CHECK-SDAG: // %bb.0:
201 ; CHECK-SDAG-NEXT: sub sp, sp, #16
202 ; CHECK-SDAG-NEXT: .cfi_def_cfa_offset 16
203 ; CHECK-SDAG-NEXT: mov x8, sp
204 ; CHECK-SDAG-NEXT: // kill: def $w0 killed $w0 def $x0
205 ; CHECK-SDAG-NEXT: str q0, [sp]
206 ; CHECK-SDAG-NEXT: bfi x8, x0, #1, #3
207 ; CHECK-SDAG-NEXT: ldr h1, [x8]
208 ; CHECK-SDAG-NEXT: mov v1.h[1], v0.h[1]
209 ; CHECK-SDAG-NEXT: mov v1.h[2], v0.h[2]
210 ; CHECK-SDAG-NEXT: mov v1.h[3], v0.h[3]
211 ; CHECK-SDAG-NEXT: fmov d0, d1
212 ; CHECK-SDAG-NEXT: add sp, sp, #16
213 ; CHECK-SDAG-NEXT: ret
215 ; CHECK-GISEL-LABEL: test_varidx_extract_v8s16:
216 ; CHECK-GISEL: // %bb.0:
217 ; CHECK-GISEL-NEXT: sub sp, sp, #16
218 ; CHECK-GISEL-NEXT: .cfi_def_cfa_offset 16
219 ; CHECK-GISEL-NEXT: mov w9, w0
220 ; CHECK-GISEL-NEXT: mov h2, v0.h[1]
221 ; CHECK-GISEL-NEXT: mov x8, sp
222 ; CHECK-GISEL-NEXT: str q0, [sp]
223 ; CHECK-GISEL-NEXT: and x9, x9, #0x7
224 ; CHECK-GISEL-NEXT: mov h3, v0.h[2]
225 ; CHECK-GISEL-NEXT: ldr h1, [x8, x9, lsl #1]
226 ; CHECK-GISEL-NEXT: mov h0, v0.h[3]
227 ; CHECK-GISEL-NEXT: mov v1.h[1], v2.h[0]
228 ; CHECK-GISEL-NEXT: mov v1.h[2], v3.h[0]
229 ; CHECK-GISEL-NEXT: mov v1.h[3], v0.h[0]
230 ; CHECK-GISEL-NEXT: fmov d0, d1
231 ; CHECK-GISEL-NEXT: add sp, sp, #16
232 ; CHECK-GISEL-NEXT: ret
233 %tmp = extractelement <8 x i16> %x, i32 %idx
234 %tmp2 = insertelement <4 x i16> undef, i16 %tmp, i32 0
235 %tmp3 = extractelement <8 x i16> %x, i32 1
236 %tmp4 = insertelement <4 x i16> %tmp2, i16 %tmp3, i32 1
237 %tmp5 = extractelement <8 x i16> %x, i32 2
238 %tmp6 = insertelement <4 x i16> %tmp4, i16 %tmp5, i32 2
239 %tmp7 = extractelement <8 x i16> %x, i32 3
240 %tmp8 = insertelement <4 x i16> %tmp6, i16 %tmp7, i32 3
244 define i32 @test_varidx_extract_v2s32(<2 x i32> %x, i32 %idx) {
245 ; CHECK-SDAG-LABEL: test_varidx_extract_v2s32:
246 ; CHECK-SDAG: // %bb.0:
247 ; CHECK-SDAG-NEXT: sub sp, sp, #16
248 ; CHECK-SDAG-NEXT: .cfi_def_cfa_offset 16
249 ; CHECK-SDAG-NEXT: add x8, sp, #8
250 ; CHECK-SDAG-NEXT: // kill: def $w0 killed $w0 def $x0
251 ; CHECK-SDAG-NEXT: str d0, [sp, #8]
252 ; CHECK-SDAG-NEXT: bfi x8, x0, #2, #1
253 ; CHECK-SDAG-NEXT: ldr w0, [x8]
254 ; CHECK-SDAG-NEXT: add sp, sp, #16
255 ; CHECK-SDAG-NEXT: ret
257 ; CHECK-GISEL-LABEL: test_varidx_extract_v2s32:
258 ; CHECK-GISEL: // %bb.0:
259 ; CHECK-GISEL-NEXT: sub sp, sp, #16
260 ; CHECK-GISEL-NEXT: .cfi_def_cfa_offset 16
261 ; CHECK-GISEL-NEXT: mov w9, w0
262 ; CHECK-GISEL-NEXT: add x8, sp, #8
263 ; CHECK-GISEL-NEXT: str d0, [sp, #8]
264 ; CHECK-GISEL-NEXT: and x9, x9, #0x1
265 ; CHECK-GISEL-NEXT: ldr w0, [x8, x9, lsl #2]
266 ; CHECK-GISEL-NEXT: add sp, sp, #16
267 ; CHECK-GISEL-NEXT: ret
268 %tmp = extractelement <2 x i32> %x, i32 %idx
272 define <2 x i32> @test_varidx_extract_v4s32(<4 x i32> %x, i32 %idx) {
273 ; CHECK-SDAG-LABEL: test_varidx_extract_v4s32:
274 ; CHECK-SDAG: // %bb.0:
275 ; CHECK-SDAG-NEXT: sub sp, sp, #16
276 ; CHECK-SDAG-NEXT: .cfi_def_cfa_offset 16
277 ; CHECK-SDAG-NEXT: mov x8, sp
278 ; CHECK-SDAG-NEXT: // kill: def $w0 killed $w0 def $x0
279 ; CHECK-SDAG-NEXT: str q0, [sp]
280 ; CHECK-SDAG-NEXT: bfi x8, x0, #2, #2
281 ; CHECK-SDAG-NEXT: ldr s1, [x8]
282 ; CHECK-SDAG-NEXT: mov v1.s[1], v0.s[1]
283 ; CHECK-SDAG-NEXT: fmov d0, d1
284 ; CHECK-SDAG-NEXT: add sp, sp, #16
285 ; CHECK-SDAG-NEXT: ret
287 ; CHECK-GISEL-LABEL: test_varidx_extract_v4s32:
288 ; CHECK-GISEL: // %bb.0:
289 ; CHECK-GISEL-NEXT: sub sp, sp, #16
290 ; CHECK-GISEL-NEXT: .cfi_def_cfa_offset 16
291 ; CHECK-GISEL-NEXT: mov w9, w0
292 ; CHECK-GISEL-NEXT: mov s1, v0.s[1]
293 ; CHECK-GISEL-NEXT: mov x8, sp
294 ; CHECK-GISEL-NEXT: str q0, [sp]
295 ; CHECK-GISEL-NEXT: and x9, x9, #0x3
296 ; CHECK-GISEL-NEXT: ldr s0, [x8, x9, lsl #2]
297 ; CHECK-GISEL-NEXT: mov v0.s[1], v1.s[0]
298 ; CHECK-GISEL-NEXT: // kill: def $d0 killed $d0 killed $q0
299 ; CHECK-GISEL-NEXT: add sp, sp, #16
300 ; CHECK-GISEL-NEXT: ret
301 %tmp = extractelement <4 x i32> %x, i32 %idx
302 %tmp2 = insertelement <2 x i32> undef, i32 %tmp, i32 0
303 %tmp3 = extractelement <4 x i32> %x, i32 1
304 %tmp4 = insertelement <2 x i32> %tmp2, i32 %tmp3, i32 1
308 define i64 @test_varidx_extract_v2s64(<2 x i64> %x, i32 %idx) {
309 ; CHECK-SDAG-LABEL: test_varidx_extract_v2s64:
310 ; CHECK-SDAG: // %bb.0:
311 ; CHECK-SDAG-NEXT: sub sp, sp, #16
312 ; CHECK-SDAG-NEXT: .cfi_def_cfa_offset 16
313 ; CHECK-SDAG-NEXT: mov x8, sp
314 ; CHECK-SDAG-NEXT: // kill: def $w0 killed $w0 def $x0
315 ; CHECK-SDAG-NEXT: str q0, [sp]
316 ; CHECK-SDAG-NEXT: bfi x8, x0, #3, #1
317 ; CHECK-SDAG-NEXT: ldr x0, [x8]
318 ; CHECK-SDAG-NEXT: add sp, sp, #16
319 ; CHECK-SDAG-NEXT: ret
321 ; CHECK-GISEL-LABEL: test_varidx_extract_v2s64:
322 ; CHECK-GISEL: // %bb.0:
323 ; CHECK-GISEL-NEXT: sub sp, sp, #16
324 ; CHECK-GISEL-NEXT: .cfi_def_cfa_offset 16
325 ; CHECK-GISEL-NEXT: mov w9, w0
326 ; CHECK-GISEL-NEXT: mov x8, sp
327 ; CHECK-GISEL-NEXT: str q0, [sp]
328 ; CHECK-GISEL-NEXT: and x9, x9, #0x1
329 ; CHECK-GISEL-NEXT: ldr x0, [x8, x9, lsl #3]
330 ; CHECK-GISEL-NEXT: add sp, sp, #16
331 ; CHECK-GISEL-NEXT: ret
332 %tmp = extractelement <2 x i64> %x, i32 %idx
336 define ptr @test_varidx_extract_v2p0(<2 x ptr> %x, i32 %idx) {
337 ; CHECK-SDAG-LABEL: test_varidx_extract_v2p0:
338 ; CHECK-SDAG: // %bb.0:
339 ; CHECK-SDAG-NEXT: sub sp, sp, #16
340 ; CHECK-SDAG-NEXT: .cfi_def_cfa_offset 16
341 ; CHECK-SDAG-NEXT: mov x8, sp
342 ; CHECK-SDAG-NEXT: // kill: def $w0 killed $w0 def $x0
343 ; CHECK-SDAG-NEXT: str q0, [sp]
344 ; CHECK-SDAG-NEXT: bfi x8, x0, #3, #1
345 ; CHECK-SDAG-NEXT: ldr x0, [x8]
346 ; CHECK-SDAG-NEXT: add sp, sp, #16
347 ; CHECK-SDAG-NEXT: ret
349 ; CHECK-GISEL-LABEL: test_varidx_extract_v2p0:
350 ; CHECK-GISEL: // %bb.0:
351 ; CHECK-GISEL-NEXT: sub sp, sp, #16
352 ; CHECK-GISEL-NEXT: .cfi_def_cfa_offset 16
353 ; CHECK-GISEL-NEXT: mov w9, w0
354 ; CHECK-GISEL-NEXT: mov x8, sp
355 ; CHECK-GISEL-NEXT: str q0, [sp]
356 ; CHECK-GISEL-NEXT: and x9, x9, #0x1
357 ; CHECK-GISEL-NEXT: ldr x0, [x8, x9, lsl #3]
358 ; CHECK-GISEL-NEXT: add sp, sp, #16
359 ; CHECK-GISEL-NEXT: ret
360 %tmp = extractelement <2 x ptr> %x, i32 %idx