1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s
3 ; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s
5 define arm_aapcs_vfpcc <16 x i8> @mov_int8_1() {
6 ; CHECK-LABEL: mov_int8_1:
7 ; CHECK: @ %bb.0: @ %entry
8 ; CHECK-NEXT: vmov.i8 q0, #0x1
11 ret <16 x i8> <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>
14 define arm_aapcs_vfpcc <16 x i8> @mov_int8_m1() {
15 ; CHECK-LABEL: mov_int8_m1:
16 ; CHECK: @ %bb.0: @ %entry
17 ; CHECK-NEXT: vmov.i8 q0, #0xff
20 ret <16 x i8> <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>
23 define arm_aapcs_vfpcc <8 x i16> @mov_int16_1() {
24 ; CHECK-LABEL: mov_int16_1:
25 ; CHECK: @ %bb.0: @ %entry
26 ; CHECK-NEXT: vmov.i16 q0, #0x1
29 ret <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
32 define arm_aapcs_vfpcc <8 x i16> @mov_int16_m1() {
33 ; CHECK-LABEL: mov_int16_m1:
34 ; CHECK: @ %bb.0: @ %entry
35 ; CHECK-NEXT: vmov.i8 q0, #0xff
38 ret <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
41 define arm_aapcs_vfpcc <8 x i16> @mov_int16_256() {
42 ; CHECK-LABEL: mov_int16_256:
43 ; CHECK: @ %bb.0: @ %entry
44 ; CHECK-NEXT: vmov.i16 q0, #0x100
47 ret <8 x i16> <i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256>
50 define arm_aapcs_vfpcc <8 x i16> @mov_int16_257() {
51 ; CHECK-LABEL: mov_int16_257:
52 ; CHECK: @ %bb.0: @ %entry
53 ; CHECK-NEXT: vmov.i8 q0, #0x1
56 ret <8 x i16> <i16 257, i16 257, i16 257, i16 257, i16 257, i16 257, i16 257, i16 257>
59 define arm_aapcs_vfpcc <8 x i16> @mov_int16_258() {
60 ; CHECK-LABEL: mov_int16_258:
61 ; CHECK: @ %bb.0: @ %entry
62 ; CHECK-NEXT: adr r0, .LCPI6_0
63 ; CHECK-NEXT: vldrw.u32 q0, [r0]
65 ; CHECK-NEXT: .p2align 4
66 ; CHECK-NEXT: @ %bb.1:
67 ; CHECK-NEXT: .LCPI6_0:
68 ; CHECK-NEXT: .long 16908546 @ double 8.204306265173532E-304
69 ; CHECK-NEXT: .long 16908546
70 ; CHECK-NEXT: .long 16908546 @ double 8.204306265173532E-304
71 ; CHECK-NEXT: .long 16908546
73 ret <8 x i16> <i16 258, i16 258, i16 258, i16 258, i16 258, i16 258, i16 258, i16 258>
76 define arm_aapcs_vfpcc <4 x i32> @mov_int32_1() {
77 ; CHECK-LABEL: mov_int32_1:
78 ; CHECK: @ %bb.0: @ %entry
79 ; CHECK-NEXT: vmov.i32 q0, #0x1
82 ret <4 x i32> <i32 1, i32 1, i32 1, i32 1>
85 define arm_aapcs_vfpcc <4 x i32> @mov_int32_256() {
86 ; CHECK-LABEL: mov_int32_256:
87 ; CHECK: @ %bb.0: @ %entry
88 ; CHECK-NEXT: vmov.i32 q0, #0x100
91 ret <4 x i32> <i32 256, i32 256, i32 256, i32 256>
94 define arm_aapcs_vfpcc <4 x i32> @mov_int32_65536() {
95 ; CHECK-LABEL: mov_int32_65536:
96 ; CHECK: @ %bb.0: @ %entry
97 ; CHECK-NEXT: vmov.i32 q0, #0x10000
100 ret <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>
103 define arm_aapcs_vfpcc <4 x i32> @mov_int32_16777216() {
104 ; CHECK-LABEL: mov_int32_16777216:
105 ; CHECK: @ %bb.0: @ %entry
106 ; CHECK-NEXT: vmov.i32 q0, #0x1000000
109 ret <4 x i32> <i32 16777216, i32 16777216, i32 16777216, i32 16777216>
112 define arm_aapcs_vfpcc <4 x i32> @mov_int32_16777217() {
113 ; CHECK-LABEL: mov_int32_16777217:
114 ; CHECK: @ %bb.0: @ %entry
115 ; CHECK-NEXT: adr r0, .LCPI11_0
116 ; CHECK-NEXT: vldrw.u32 q0, [r0]
118 ; CHECK-NEXT: .p2align 4
119 ; CHECK-NEXT: @ %bb.1:
120 ; CHECK-NEXT: .LCPI11_0:
121 ; CHECK-NEXT: .long 16777217 @ double 7.2911290000737531E-304
122 ; CHECK-NEXT: .long 16777217
123 ; CHECK-NEXT: .long 16777217 @ double 7.2911290000737531E-304
124 ; CHECK-NEXT: .long 16777217
126 ret <4 x i32> <i32 16777217, i32 16777217, i32 16777217, i32 16777217>
129 define arm_aapcs_vfpcc <4 x i32> @mov_int32_17919() {
130 ; CHECK-LABEL: mov_int32_17919:
131 ; CHECK: @ %bb.0: @ %entry
132 ; CHECK-NEXT: vmov.i32 q0, #0x45ff
135 ret <4 x i32> <i32 17919, i32 17919, i32 17919, i32 17919>
138 define arm_aapcs_vfpcc <4 x i32> @mov_int32_4587519() {
139 ; CHECK-LABEL: mov_int32_4587519:
140 ; CHECK: @ %bb.0: @ %entry
141 ; CHECK-NEXT: vmov.i32 q0, #0x45ffff
144 ret <4 x i32> <i32 4587519, i32 4587519, i32 4587519, i32 4587519>
147 define arm_aapcs_vfpcc <4 x i32> @mov_int32_m1() {
148 ; CHECK-LABEL: mov_int32_m1:
149 ; CHECK: @ %bb.0: @ %entry
150 ; CHECK-NEXT: vmov.i8 q0, #0xff
153 ret <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>
156 define arm_aapcs_vfpcc <4 x i32> @mov_int32_4294901760() {
157 ; CHECK-LABEL: mov_int32_4294901760:
158 ; CHECK: @ %bb.0: @ %entry
159 ; CHECK-NEXT: vmvn.i32 q0, #0xffff
162 ret <4 x i32> <i32 4294901760, i32 4294901760, i32 4294901760, i32 4294901760>
165 define arm_aapcs_vfpcc <4 x i32> @mov_int32_4278190335() {
166 ; CHECK-LABEL: mov_int32_4278190335:
167 ; CHECK: @ %bb.0: @ %entry
168 ; CHECK-NEXT: adr r0, .LCPI16_0
169 ; CHECK-NEXT: vldrw.u32 q0, [r0]
171 ; CHECK-NEXT: .p2align 4
172 ; CHECK-NEXT: @ %bb.1:
173 ; CHECK-NEXT: .LCPI16_0:
174 ; CHECK-NEXT: .long 4278190335 @ double -5.4874634341155774E+303
175 ; CHECK-NEXT: .long 4278190335
176 ; CHECK-NEXT: .long 4278190335 @ double -5.4874634341155774E+303
177 ; CHECK-NEXT: .long 4278190335
179 ret <4 x i32> <i32 4278190335, i32 4278190335, i32 4278190335, i32 4278190335>
182 define arm_aapcs_vfpcc <4 x i32> @mov_int32_4278255615() {
183 ; CHECK-LABEL: mov_int32_4278255615:
184 ; CHECK: @ %bb.0: @ %entry
185 ; CHECK-NEXT: vmvn.i32 q0, #0xff0000
188 ret <4 x i32> <i32 4278255615, i32 4278255615, i32 4278255615, i32 4278255615>
191 define arm_aapcs_vfpcc <2 x i64> @mov_int64_1() {
192 ; CHECK-LABEL: mov_int64_1:
193 ; CHECK: @ %bb.0: @ %entry
194 ; CHECK-NEXT: adr r0, .LCPI18_0
195 ; CHECK-NEXT: vldrw.u32 q0, [r0]
197 ; CHECK-NEXT: .p2align 4
198 ; CHECK-NEXT: @ %bb.1:
199 ; CHECK-NEXT: .LCPI18_0:
200 ; CHECK-NEXT: .long 1 @ double 4.9406564584124654E-324
201 ; CHECK-NEXT: .long 0
202 ; CHECK-NEXT: .long 1 @ double 4.9406564584124654E-324
203 ; CHECK-NEXT: .long 0
205 ret <2 x i64> <i64 1, i64 1>
208 define arm_aapcs_vfpcc <2 x i64> @mov_int64_m1() {
209 ; CHECK-LABEL: mov_int64_m1:
210 ; CHECK: @ %bb.0: @ %entry
211 ; CHECK-NEXT: vmov.i8 q0, #0xff
214 ret <2 x i64> <i64 -1, i64 -1>
217 define arm_aapcs_vfpcc <4 x float> @mov_float_1() {
218 ; CHECK-LABEL: mov_float_1:
219 ; CHECK: @ %bb.0: @ %entry
220 ; CHECK-NEXT: adr r0, .LCPI20_0
221 ; CHECK-NEXT: vldrw.u32 q0, [r0]
223 ; CHECK-NEXT: .p2align 4
224 ; CHECK-NEXT: @ %bb.1:
225 ; CHECK-NEXT: .LCPI20_0:
226 ; CHECK-NEXT: .long 1065353216 @ double 0.007812501848093234
227 ; CHECK-NEXT: .long 1065353216
228 ; CHECK-NEXT: .long 1065353216 @ double 0.007812501848093234
229 ; CHECK-NEXT: .long 1065353216
231 ret <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
234 define arm_aapcs_vfpcc <4 x float> @mov_float_m3() {
235 ; CHECK-LABEL: mov_float_m3:
236 ; CHECK: @ %bb.0: @ %entry
237 ; CHECK-NEXT: adr r0, .LCPI21_0
238 ; CHECK-NEXT: vldrw.u32 q0, [r0]
240 ; CHECK-NEXT: .p2align 4
241 ; CHECK-NEXT: @ %bb.1:
242 ; CHECK-NEXT: .LCPI21_0:
243 ; CHECK-NEXT: .long 3225419776 @ double -32.000022917985916
244 ; CHECK-NEXT: .long 3225419776
245 ; CHECK-NEXT: .long 3225419776 @ double -32.000022917985916
246 ; CHECK-NEXT: .long 3225419776
248 ret <4 x float> <float -3.000000e+00, float -3.000000e+00, float -3.000000e+00, float -3.000000e+00>
251 define arm_aapcs_vfpcc <8 x half> @mov_float16_1() {
252 ; CHECK-LABEL: mov_float16_1:
253 ; CHECK: @ %bb.0: @ %entry
254 ; CHECK-NEXT: vmov.i16 q0, #0x3c00
258 ret <8 x half> <half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00>
261 define arm_aapcs_vfpcc <8 x half> @mov_float16_m3() {
262 ; CHECK-LABEL: mov_float16_m3:
263 ; CHECK: @ %bb.0: @ %entry
264 ; CHECK-NEXT: vmov.i16 q0, #0xc200
268 ret <8 x half> <half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00>
271 define arm_aapcs_vfpcc <2 x double> @mov_double_1() {
272 ; CHECK-LABEL: mov_double_1:
273 ; CHECK: @ %bb.0: @ %entry
274 ; CHECK-NEXT: adr r0, .LCPI24_0
275 ; CHECK-NEXT: vldrw.u32 q0, [r0]
277 ; CHECK-NEXT: .p2align 4
278 ; CHECK-NEXT: @ %bb.1:
279 ; CHECK-NEXT: .LCPI24_0:
280 ; CHECK-NEXT: .long 0 @ double 1
281 ; CHECK-NEXT: .long 1072693248
282 ; CHECK-NEXT: .long 0 @ double 1
283 ; CHECK-NEXT: .long 1072693248
285 ret <2 x double> <double 1.000000e+00, double 1.000000e+00>