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 --check-prefixes=CHECK,CHECK-SD
3 ; RUN: llc -mtriple=aarch64-none-linux-gnu -mattr=+neon -global-isel %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI
5 define <8 x i8> @movi8b() {
8 ; CHECK-NEXT: movi v0.8b, #8
10 ret <8 x i8> < i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8 >
13 define <16 x i8> @movi16b() {
14 ; CHECK-LABEL: movi16b:
16 ; CHECK-NEXT: movi v0.16b, #8
18 ret <16 x i8> < i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8 >
21 define <2 x i32> @movi2s_lsl0() {
22 ; CHECK-LABEL: movi2s_lsl0:
24 ; CHECK-NEXT: movi d0, #0x0000ff000000ff
26 ret <2 x i32> < i32 255, i32 255 >
29 define <2 x i32> @movi2s_lsl8() {
30 ; CHECK-LABEL: movi2s_lsl8:
32 ; CHECK-NEXT: movi d0, #0x00ff000000ff00
34 ret <2 x i32> < i32 65280, i32 65280 >
37 define <2 x i32> @movi2s_lsl16() {
38 ; CHECK-LABEL: movi2s_lsl16:
40 ; CHECK-NEXT: movi d0, #0xff000000ff0000
42 ret <2 x i32> < i32 16711680, i32 16711680 >
46 define <2 x i32> @movi2s_lsl24() {
47 ; CHECK-LABEL: movi2s_lsl24:
49 ; CHECK-NEXT: movi d0, #0xff000000ff000000
51 ret <2 x i32> < i32 4278190080, i32 4278190080 >
54 define <4 x i32> @movi4s_lsl0() {
55 ; CHECK-LABEL: movi4s_lsl0:
57 ; CHECK-NEXT: movi v0.2d, #0x0000ff000000ff
59 ret <4 x i32> < i32 255, i32 255, i32 255, i32 255 >
62 define <4 x i32> @movi4s_lsl8() {
63 ; CHECK-LABEL: movi4s_lsl8:
65 ; CHECK-NEXT: movi v0.2d, #0x00ff000000ff00
67 ret <4 x i32> < i32 65280, i32 65280, i32 65280, i32 65280 >
70 define <4 x i32> @movi4s_lsl16() {
71 ; CHECK-LABEL: movi4s_lsl16:
73 ; CHECK-NEXT: movi v0.2d, #0xff000000ff0000
75 ret <4 x i32> < i32 16711680, i32 16711680, i32 16711680, i32 16711680 >
79 define <4 x i32> @movi4s_lsl24() {
80 ; CHECK-LABEL: movi4s_lsl24:
82 ; CHECK-NEXT: movi v0.2d, #0xff000000ff000000
84 ret <4 x i32> < i32 4278190080, i32 4278190080, i32 4278190080, i32 4278190080 >
87 define <4 x i16> @movi4h_lsl0() {
88 ; CHECK-LABEL: movi4h_lsl0:
90 ; CHECK-NEXT: movi d0, #0xff00ff00ff00ff
92 ret <4 x i16> < i16 255, i16 255, i16 255, i16 255 >
95 define <4 x i16> @movi4h_lsl8() {
96 ; CHECK-LABEL: movi4h_lsl8:
98 ; CHECK-NEXT: movi d0, #0xff00ff00ff00ff00
100 ret <4 x i16> < i16 65280, i16 65280, i16 65280, i16 65280 >
103 define <8 x i16> @movi8h_lsl0() {
104 ; CHECK-LABEL: movi8h_lsl0:
106 ; CHECK-NEXT: movi v0.2d, #0xff00ff00ff00ff
108 ret <8 x i16> < i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255 >
111 define <8 x i16> @movi8h_lsl8() {
112 ; CHECK-LABEL: movi8h_lsl8:
114 ; CHECK-NEXT: movi v0.2d, #0xff00ff00ff00ff00
116 ret <8 x i16> < i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280 >
120 define <2 x i32> @mvni2s_lsl0() {
121 ; CHECK-LABEL: mvni2s_lsl0:
123 ; CHECK-NEXT: mvni v0.2s, #16
125 ret <2 x i32> < i32 4294967279, i32 4294967279 >
128 define <2 x i32> @mvni2s_lsl8() {
129 ; CHECK-LABEL: mvni2s_lsl8:
131 ; CHECK-NEXT: mvni v0.2s, #16, lsl #8
133 ret <2 x i32> < i32 4294963199, i32 4294963199 >
136 define <2 x i32> @mvni2s_lsl16() {
137 ; CHECK-LABEL: mvni2s_lsl16:
139 ; CHECK-NEXT: mvni v0.2s, #16, lsl #16
141 ret <2 x i32> < i32 4293918719, i32 4293918719 >
144 define <2 x i32> @mvni2s_lsl24() {
145 ; CHECK-LABEL: mvni2s_lsl24:
147 ; CHECK-NEXT: mvni v0.2s, #16, lsl #24
149 ret <2 x i32> < i32 4026531839, i32 4026531839 >
152 define <4 x i32> @mvni4s_lsl0() {
153 ; CHECK-LABEL: mvni4s_lsl0:
155 ; CHECK-NEXT: mvni v0.4s, #16
157 ret <4 x i32> < i32 4294967279, i32 4294967279, i32 4294967279, i32 4294967279 >
160 define <4 x i32> @mvni4s_lsl8() {
161 ; CHECK-LABEL: mvni4s_lsl8:
163 ; CHECK-NEXT: mvni v0.4s, #16, lsl #8
165 ret <4 x i32> < i32 4294963199, i32 4294963199, i32 4294963199, i32 4294963199 >
168 define <4 x i32> @mvni4s_lsl16() {
169 ; CHECK-LABEL: mvni4s_lsl16:
171 ; CHECK-NEXT: mvni v0.4s, #16, lsl #16
173 ret <4 x i32> < i32 4293918719, i32 4293918719, i32 4293918719, i32 4293918719 >
177 define <4 x i32> @mvni4s_lsl24() {
178 ; CHECK-LABEL: mvni4s_lsl24:
180 ; CHECK-NEXT: mvni v0.4s, #16, lsl #24
182 ret <4 x i32> < i32 4026531839, i32 4026531839, i32 4026531839, i32 4026531839 >
186 define <4 x i16> @mvni4h_lsl0() {
187 ; CHECK-LABEL: mvni4h_lsl0:
189 ; CHECK-NEXT: mvni v0.4h, #16
191 ret <4 x i16> < i16 65519, i16 65519, i16 65519, i16 65519 >
194 define <4 x i16> @mvni4h_lsl8() {
195 ; CHECK-LABEL: mvni4h_lsl8:
197 ; CHECK-NEXT: mvni v0.4h, #16, lsl #8
199 ret <4 x i16> < i16 61439, i16 61439, i16 61439, i16 61439 >
202 define <8 x i16> @mvni8h_lsl0() {
203 ; CHECK-LABEL: mvni8h_lsl0:
205 ; CHECK-NEXT: mvni v0.8h, #16
207 ret <8 x i16> < i16 65519, i16 65519, i16 65519, i16 65519, i16 65519, i16 65519, i16 65519, i16 65519 >
210 define <8 x i16> @mvni8h_lsl8() {
211 ; CHECK-LABEL: mvni8h_lsl8:
213 ; CHECK-NEXT: mvni v0.8h, #16, lsl #8
215 ret <8 x i16> < i16 61439, i16 61439, i16 61439, i16 61439, i16 61439, i16 61439, i16 61439, i16 61439 >
219 define <2 x i32> @movi2s_msl8(<2 x i32> %a) {
220 ; CHECK-LABEL: movi2s_msl8:
222 ; CHECK-NEXT: movi d0, #0x00ffff0000ffff
224 ret <2 x i32> < i32 65535, i32 65535 >
227 define <2 x i32> @movi2s_msl16() {
228 ; CHECK-LABEL: movi2s_msl16:
230 ; CHECK-NEXT: movi d0, #0xffffff00ffffff
232 ret <2 x i32> < i32 16777215, i32 16777215 >
236 define <4 x i32> @movi4s_msl8() {
237 ; CHECK-LABEL: movi4s_msl8:
239 ; CHECK-NEXT: movi v0.2d, #0x00ffff0000ffff
241 ret <4 x i32> < i32 65535, i32 65535, i32 65535, i32 65535 >
244 define <4 x i32> @movi4s_msl16() {
245 ; CHECK-LABEL: movi4s_msl16:
247 ; CHECK-NEXT: movi v0.2d, #0xffffff00ffffff
249 ret <4 x i32> < i32 16777215, i32 16777215, i32 16777215, i32 16777215 >
252 define <2 x i32> @mvni2s_msl8() {
253 ; CHECK-LABEL: mvni2s_msl8:
255 ; CHECK-NEXT: mvni v0.2s, #16, msl #8
257 ret <2 x i32> < i32 18446744073709547264, i32 18446744073709547264>
260 define <2 x i32> @mvni2s_msl16() {
261 ; CHECK-LABEL: mvni2s_msl16:
263 ; CHECK-NEXT: mvni v0.2s, #16, msl #16
265 ret <2 x i32> < i32 18446744073708437504, i32 18446744073708437504>
268 define <4 x i32> @mvni4s_msl8() {
269 ; CHECK-LABEL: mvni4s_msl8:
271 ; CHECK-NEXT: mvni v0.4s, #16, msl #8
273 ret <4 x i32> < i32 18446744073709547264, i32 18446744073709547264, i32 18446744073709547264, i32 18446744073709547264>
276 define <4 x i32> @mvni4s_msl16() {
277 ; CHECK-LABEL: mvni4s_msl16:
279 ; CHECK-NEXT: mvni v0.4s, #16, msl #16
281 ret <4 x i32> < i32 18446744073708437504, i32 18446744073708437504, i32 18446744073708437504, i32 18446744073708437504>
284 define <2 x i64> @movi2d() {
285 ; CHECK-LABEL: movi2d:
287 ; CHECK-NEXT: movi v0.2d, #0xff0000ff0000ffff
289 ret <2 x i64> < i64 18374687574888349695, i64 18374687574888349695 >
292 define <1 x i64> @movid() {
293 ; CHECK-SD-LABEL: movid:
294 ; CHECK-SD: // %bb.0:
295 ; CHECK-SD-NEXT: movi d0, #0xff0000ff0000ffff
298 ; CHECK-GI-LABEL: movid:
299 ; CHECK-GI: // %bb.0:
300 ; CHECK-GI-NEXT: mov x8, #-72056494526300161 // =0xff0000ffffffffff
301 ; CHECK-GI-NEXT: movk x8, #0, lsl #16
302 ; CHECK-GI-NEXT: fmov d0, x8
304 ret <1 x i64> < i64 18374687574888349695 >
307 define <2 x float> @fmov2s() {
308 ; CHECK-LABEL: fmov2s:
310 ; CHECK-NEXT: fmov v0.2s, #-12.00000000
312 ret <2 x float> < float -1.2e1, float -1.2e1>
315 define <4 x float> @fmov4s() {
316 ; CHECK-LABEL: fmov4s:
318 ; CHECK-NEXT: fmov v0.4s, #-12.00000000
320 ret <4 x float> < float -1.2e1, float -1.2e1, float -1.2e1, float -1.2e1>
323 define <2 x double> @fmov2d() {
324 ; CHECK-LABEL: fmov2d:
326 ; CHECK-NEXT: fmov v0.2d, #-12.00000000
328 ret <2 x double> < double -1.2e1, double -1.2e1>
331 define <2 x i32> @movi1d_1() {
332 ; CHECK-SD-LABEL: movi1d_1:
333 ; CHECK-SD: // %bb.0:
334 ; CHECK-SD-NEXT: movi d0, #0x00ffffffff0000
337 ; CHECK-GI-LABEL: movi1d_1:
338 ; CHECK-GI: // %bb.0:
339 ; CHECK-GI-NEXT: adrp x8, .LCPI39_0
340 ; CHECK-GI-NEXT: ldr d0, [x8, :lo12:.LCPI39_0]
342 ret <2 x i32> < i32 -65536, i32 65535>
346 declare <2 x i32> @test_movi1d(<2 x i32>, <2 x i32>)
347 define <2 x i32> @movi1d() {
348 ; CHECK-SD-LABEL: movi1d:
349 ; CHECK-SD: // %bb.0:
350 ; CHECK-SD-NEXT: movi d1, #0x00ffffffff0000
351 ; CHECK-SD-NEXT: adrp x8, .LCPI40_0
352 ; CHECK-SD-NEXT: ldr d0, [x8, :lo12:.LCPI40_0]
353 ; CHECK-SD-NEXT: b test_movi1d
355 ; CHECK-GI-LABEL: movi1d:
356 ; CHECK-GI: // %bb.0:
357 ; CHECK-GI-NEXT: adrp x8, .LCPI40_1
358 ; CHECK-GI-NEXT: adrp x9, .LCPI40_0
359 ; CHECK-GI-NEXT: ldr d0, [x8, :lo12:.LCPI40_1]
360 ; CHECK-GI-NEXT: ldr d1, [x9, :lo12:.LCPI40_0]
361 ; CHECK-GI-NEXT: b test_movi1d
362 %1 = tail call <2 x i32> @test_movi1d(<2 x i32> <i32 -2147483648, i32 2147450880>, <2 x i32> <i32 -65536, i32 65535>)