1 ; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+neon | FileCheck %s
3 define <8 x i8> @movi8b() {
5 ; CHECK: movi {{v[0-9]+}}.8b, #{{0x8|8}}
6 ret <8 x i8> < i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8 >
9 define <16 x i8> @movi16b() {
10 ; CHECK-LABEL: movi16b:
11 ; CHECK: movi {{v[0-9]+}}.16b, #{{0x8|8}}
12 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 >
15 define <2 x i32> @movi2s_lsl0() {
16 ; CHECK-LABEL: movi2s_lsl0:
17 ; CHECK: movi {{d[0-9]+}}, #0x0000ff000000ff
18 ret <2 x i32> < i32 255, i32 255 >
21 define <2 x i32> @movi2s_lsl8() {
22 ; CHECK-LABEL: movi2s_lsl8:
23 ; CHECK: movi {{d[0-9]+}}, #0x00ff000000ff00
24 ret <2 x i32> < i32 65280, i32 65280 >
27 define <2 x i32> @movi2s_lsl16() {
28 ; CHECK-LABEL: movi2s_lsl16:
29 ; CHECK: movi {{d[0-9]+}}, #0xff000000ff0000
30 ret <2 x i32> < i32 16711680, i32 16711680 >
34 define <2 x i32> @movi2s_lsl24() {
35 ; CHECK-LABEL: movi2s_lsl24:
36 ; CHECK: movi {{d[0-9]+}}, #0xff000000ff000000
37 ret <2 x i32> < i32 4278190080, i32 4278190080 >
40 define <4 x i32> @movi4s_lsl0() {
41 ; CHECK-LABEL: movi4s_lsl0:
42 ; CHECK: movi {{v[0-9]+}}.2d, #0x0000ff000000ff
43 ret <4 x i32> < i32 255, i32 255, i32 255, i32 255 >
46 define <4 x i32> @movi4s_lsl8() {
47 ; CHECK-LABEL: movi4s_lsl8:
48 ; CHECK: movi {{v[0-9]+}}.2d, #0x00ff000000ff00
49 ret <4 x i32> < i32 65280, i32 65280, i32 65280, i32 65280 >
52 define <4 x i32> @movi4s_lsl16() {
53 ; CHECK-LABEL: movi4s_lsl16:
54 ; CHECK: movi {{v[0-9]+}}.2d, #0xff000000ff0000
55 ret <4 x i32> < i32 16711680, i32 16711680, i32 16711680, i32 16711680 >
59 define <4 x i32> @movi4s_lsl24() {
60 ; CHECK-LABEL: movi4s_lsl24:
61 ; CHECK: movi {{v[0-9]+}}.2d, #0xff000000ff000000
62 ret <4 x i32> < i32 4278190080, i32 4278190080, i32 4278190080, i32 4278190080 >
65 define <4 x i16> @movi4h_lsl0() {
66 ; CHECK-LABEL: movi4h_lsl0:
67 ; CHECK: movi {{d[0-9]+}}, #0xff00ff00ff00ff
68 ret <4 x i16> < i16 255, i16 255, i16 255, i16 255 >
71 define <4 x i16> @movi4h_lsl8() {
72 ; CHECK-LABEL: movi4h_lsl8:
73 ; CHECK: movi d0, #0xff00ff00ff00ff00
74 ret <4 x i16> < i16 65280, i16 65280, i16 65280, i16 65280 >
77 define <8 x i16> @movi8h_lsl0() {
78 ; CHECK-LABEL: movi8h_lsl0:
79 ; CHECK: movi v0.2d, #0xff00ff00ff00ff
80 ret <8 x i16> < i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255 >
83 define <8 x i16> @movi8h_lsl8() {
84 ; CHECK-LABEL: movi8h_lsl8:
85 ; CHECK: movi v0.2d, #0xff00ff00ff00ff00
86 ret <8 x i16> < i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280, i16 65280 >
90 define <2 x i32> @mvni2s_lsl0() {
91 ; CHECK-LABEL: mvni2s_lsl0:
92 ; CHECK: mvni {{v[0-9]+}}.2s, #{{0x10|16}}
93 ret <2 x i32> < i32 4294967279, i32 4294967279 >
96 define <2 x i32> @mvni2s_lsl8() {
97 ; CHECK-LABEL: mvni2s_lsl8:
98 ; CHECK: mvni {{v[0-9]+}}.2s, #{{0x10|16}}, lsl #8
99 ret <2 x i32> < i32 4294963199, i32 4294963199 >
102 define <2 x i32> @mvni2s_lsl16() {
103 ; CHECK-LABEL: mvni2s_lsl16:
104 ; CHECK: mvni {{v[0-9]+}}.2s, #{{0x10|16}}, lsl #16
105 ret <2 x i32> < i32 4293918719, i32 4293918719 >
108 define <2 x i32> @mvni2s_lsl24() {
109 ; CHECK-LABEL: mvni2s_lsl24:
110 ; CHECK: mvni {{v[0-9]+}}.2s, #{{0x10|16}}, lsl #24
111 ret <2 x i32> < i32 4026531839, i32 4026531839 >
114 define <4 x i32> @mvni4s_lsl0() {
115 ; CHECK-LABEL: mvni4s_lsl0:
116 ; CHECK: mvni {{v[0-9]+}}.4s, #{{0x10|16}}
117 ret <4 x i32> < i32 4294967279, i32 4294967279, i32 4294967279, i32 4294967279 >
120 define <4 x i32> @mvni4s_lsl8() {
121 ; CHECK-LABEL: mvni4s_lsl8:
122 ; CHECK: mvni {{v[0-9]+}}.4s, #{{0x10|16}}, lsl #8
123 ret <4 x i32> < i32 4294963199, i32 4294963199, i32 4294963199, i32 4294963199 >
126 define <4 x i32> @mvni4s_lsl16() {
127 ; CHECK-LABEL: mvni4s_lsl16:
128 ; CHECK: mvni {{v[0-9]+}}.4s, #{{0x10|16}}, lsl #16
129 ret <4 x i32> < i32 4293918719, i32 4293918719, i32 4293918719, i32 4293918719 >
133 define <4 x i32> @mvni4s_lsl24() {
134 ; CHECK-LABEL: mvni4s_lsl24:
135 ; CHECK: mvni {{v[0-9]+}}.4s, #{{0x10|16}}, lsl #24
136 ret <4 x i32> < i32 4026531839, i32 4026531839, i32 4026531839, i32 4026531839 >
140 define <4 x i16> @mvni4h_lsl0() {
141 ; CHECK-LABEL: mvni4h_lsl0:
142 ; CHECK: mvni {{v[0-9]+}}.4h, #{{0x10|16}}
143 ret <4 x i16> < i16 65519, i16 65519, i16 65519, i16 65519 >
146 define <4 x i16> @mvni4h_lsl8() {
147 ; CHECK-LABEL: mvni4h_lsl8:
148 ; CHECK: mvni {{v[0-9]+}}.4h, #{{0x10|16}}, lsl #8
149 ret <4 x i16> < i16 61439, i16 61439, i16 61439, i16 61439 >
152 define <8 x i16> @mvni8h_lsl0() {
153 ; CHECK-LABEL: mvni8h_lsl0:
154 ; CHECK: mvni {{v[0-9]+}}.8h, #{{0x10|16}}
155 ret <8 x i16> < i16 65519, i16 65519, i16 65519, i16 65519, i16 65519, i16 65519, i16 65519, i16 65519 >
158 define <8 x i16> @mvni8h_lsl8() {
159 ; CHECK-LABEL: mvni8h_lsl8:
160 ; CHECK: mvni {{v[0-9]+}}.8h, #{{0x10|16}}, lsl #8
161 ret <8 x i16> < i16 61439, i16 61439, i16 61439, i16 61439, i16 61439, i16 61439, i16 61439, i16 61439 >
165 define <2 x i32> @movi2s_msl8(<2 x i32> %a) {
166 ; CHECK-LABEL: movi2s_msl8:
167 ; CHECK: movi {{d[0-9]+}}, #0x00ffff0000ffff
168 ret <2 x i32> < i32 65535, i32 65535 >
171 define <2 x i32> @movi2s_msl16() {
172 ; CHECK-LABEL: movi2s_msl16:
173 ; CHECK: movi d0, #0xffffff00ffffff
174 ret <2 x i32> < i32 16777215, i32 16777215 >
178 define <4 x i32> @movi4s_msl8() {
179 ; CHECK-LABEL: movi4s_msl8:
180 ; CHECK: movi v0.2d, #0x00ffff0000ffff
181 ret <4 x i32> < i32 65535, i32 65535, i32 65535, i32 65535 >
184 define <4 x i32> @movi4s_msl16() {
185 ; CHECK-LABEL: movi4s_msl16:
186 ; CHECK: movi v0.2d, #0xffffff00ffffff
187 ret <4 x i32> < i32 16777215, i32 16777215, i32 16777215, i32 16777215 >
190 define <2 x i32> @mvni2s_msl8() {
191 ; CHECK-LABEL: mvni2s_msl8:
192 ; CHECK: mvni {{v[0-9]+}}.2s, #{{0x10|16}}, msl #8
193 ret <2 x i32> < i32 18446744073709547264, i32 18446744073709547264>
196 define <2 x i32> @mvni2s_msl16() {
197 ; CHECK-LABEL: mvni2s_msl16:
198 ; CHECK: mvni {{v[0-9]+}}.2s, #{{0x10|16}}, msl #16
199 ret <2 x i32> < i32 18446744073708437504, i32 18446744073708437504>
202 define <4 x i32> @mvni4s_msl8() {
203 ; CHECK-LABEL: mvni4s_msl8:
204 ; CHECK: mvni {{v[0-9]+}}.4s, #{{0x10|16}}, msl #8
205 ret <4 x i32> < i32 18446744073709547264, i32 18446744073709547264, i32 18446744073709547264, i32 18446744073709547264>
208 define <4 x i32> @mvni4s_msl16() {
209 ; CHECK-LABEL: mvni4s_msl16:
210 ; CHECK: mvni {{v[0-9]+}}.4s, #{{0x10|16}}, msl #16
211 ret <4 x i32> < i32 18446744073708437504, i32 18446744073708437504, i32 18446744073708437504, i32 18446744073708437504>
214 define <2 x i64> @movi2d() {
215 ; CHECK-LABEL: movi2d:
216 ; CHECK: movi {{v[0-9]+}}.2d, #0xff0000ff0000ffff
217 ret <2 x i64> < i64 18374687574888349695, i64 18374687574888349695 >
220 define <1 x i64> @movid() {
221 ; CHECK-LABEL: movid:
222 ; CHECK: movi {{d[0-9]+}}, #0xff0000ff0000ffff
223 ret <1 x i64> < i64 18374687574888349695 >
226 define <2 x float> @fmov2s() {
227 ; CHECK-LABEL: fmov2s:
228 ; CHECK: fmov {{v[0-9]+}}.2s, #{{-12.00000000|-1.200000e\+01}}
229 ret <2 x float> < float -1.2e1, float -1.2e1>
232 define <4 x float> @fmov4s() {
233 ; CHECK-LABEL: fmov4s:
234 ; CHECK: fmov {{v[0-9]+}}.4s, #{{-12.00000000|-1.200000e\+01}}
235 ret <4 x float> < float -1.2e1, float -1.2e1, float -1.2e1, float -1.2e1>
238 define <2 x double> @fmov2d() {
239 ; CHECK-LABEL: fmov2d:
240 ; CHECK: fmov {{v[0-9]+}}.2d, #{{-12.00000000|-1.200000e\+01}}
241 ret <2 x double> < double -1.2e1, double -1.2e1>
244 define <2 x i32> @movi1d_1() {
245 ; CHECK-LABEL: movi1d_1:
246 ; CHECK: movi d0, #0x{{0*}}ffffffff0000
247 ret <2 x i32> < i32 -65536, i32 65535>
251 declare <2 x i32> @test_movi1d(<2 x i32>, <2 x i32>)
252 define <2 x i32> @movi1d() {
253 ; CHECK-LABEL: movi1d:
254 ; CHECK: adrp {{x[0-9]+}}, .{{[A-Z0-9_]+}}
255 ; CHECK: ldr {{d[0-9]+}}, [{{x[0-9]+}}, {{#?}}:lo12:.{{[A-Z0-9_]+}}]
256 ; CHECK-NEXT: movi d1, #0x{{0*}}ffffffff0000
257 %1 = tail call <2 x i32> @test_movi1d(<2 x i32> <i32 -2147483648, i32 2147450880>, <2 x i32> <i32 -65536, i32 65535>)