1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s
define arm_aapcs_vfpcc void @vstrw32() {
; CHECK-LABEL: vstrw32:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r7, lr}
; CHECK-NEXT: push {r7, lr}
; CHECK-NEXT: .pad #16
; CHECK-NEXT: sub sp, #16
; CHECK-NEXT: vmov.i32 q0, #0x0
; CHECK-NEXT: mov r0, sp
; CHECK-NEXT: vstrw.32 q0, [sp, #8]
; CHECK-NEXT: bl func
; CHECK-NEXT: add sp, #16
; CHECK-NEXT: pop {r7, pc}
entry:
%d = alloca [4 x i32], align 2
%g = getelementptr inbounds [4 x i32], [4 x i32]* %d, i32 0, i32 2
%b = bitcast i32* %g to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %b, align 2
%arraydecay = getelementptr inbounds [4 x i32], [4 x i32]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i32*)*)(i32* %arraydecay)
ret void
}
define arm_aapcs_vfpcc void @vstrh16() {
; CHECK-LABEL: vstrh16:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r7, lr}
; CHECK-NEXT: push {r7, lr}
; CHECK-NEXT: .pad #16
; CHECK-NEXT: sub sp, #16
; CHECK-NEXT: vmov.i32 q0, #0x0
; CHECK-NEXT: mov r0, sp
; CHECK-NEXT: vstrh.16 q0, [sp, #4]
; CHECK-NEXT: bl func
; CHECK-NEXT: add sp, #16
; CHECK-NEXT: pop {r7, pc}
entry:
%d = alloca [8 x i16], align 2
%g = getelementptr inbounds [8 x i16], [8 x i16]* %d, i32 0, i32 2
%b = bitcast i16* %g to <8 x i16>*
store <8 x i16> zeroinitializer, <8 x i16>* %b, align 2
%arraydecay = getelementptr inbounds [8 x i16], [8 x i16]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i16*)*)(i16* %arraydecay)
ret void
}
define arm_aapcs_vfpcc void @vstrb8() {
; CHECK-LABEL: vstrb8:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r7, lr}
; CHECK-NEXT: push {r7, lr}
; CHECK-NEXT: .pad #16
; CHECK-NEXT: sub sp, #16
; CHECK-NEXT: vmov.i32 q0, #0x0
; CHECK-NEXT: mov r0, sp
; CHECK-NEXT: vstrh.16 q0, [sp, #2]
; CHECK-NEXT: bl func
; CHECK-NEXT: add sp, #16
; CHECK-NEXT: pop {r7, pc}
entry:
%d = alloca [16 x i8], align 2
%g = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 2
%b = bitcast i8* %g to <16 x i8>*
store <16 x i8> zeroinitializer, <16 x i8>* %b, align 2
%arraydecay = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i8*)*)(i8* %arraydecay)
ret void
}
define arm_aapcs_vfpcc void @vstrh32() {
; CHECK-LABEL: vstrh32:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r7, lr}
; CHECK-NEXT: push {r7, lr}
; CHECK-NEXT: .pad #8
; CHECK-NEXT: sub sp, #8
; CHECK-NEXT: mov r0, sp
; CHECK-NEXT: vmov.i32 q0, #0x6
; CHECK-NEXT: vstrh.32 q0, [r0, #4]
; CHECK-NEXT: bl func
; CHECK-NEXT: add sp, #8
; CHECK-NEXT: pop {r7, pc}
entry:
%d = alloca [4 x i16], align 2
%g = getelementptr inbounds [4 x i16], [4 x i16]* %d, i32 0, i32 2
%b = bitcast i16* %g to <4 x i16>*
store <4 x i16> <i16 6, i16 6, i16 6, i16 6>, <4 x i16>* %b, align 2
%arraydecay = getelementptr inbounds [4 x i16], [4 x i16]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i16*)*)(i16* %arraydecay)
ret void
}
define arm_aapcs_vfpcc void @vstrb32() {
; CHECK-LABEL: vstrb32:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r7, lr}
; CHECK-NEXT: push {r7, lr}
; CHECK-NEXT: .pad #8
; CHECK-NEXT: sub sp, #8
; CHECK-NEXT: add r0, sp, #4
; CHECK-NEXT: vmov.i32 q0, #0x6
; CHECK-NEXT: vstrb.32 q0, [r0, #2]
; CHECK-NEXT: bl func
; CHECK-NEXT: add sp, #8
; CHECK-NEXT: pop {r7, pc}
entry:
%d = alloca [4 x i8], align 2
%g = getelementptr inbounds [4 x i8], [4 x i8]* %d, i32 0, i32 2
%b = bitcast i8* %g to <4 x i8>*
store <4 x i8> <i8 6, i8 6, i8 6, i8 6>, <4 x i8>* %b, align 2
%arraydecay = getelementptr inbounds [4 x i8], [4 x i8]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i8*)*)(i8* %arraydecay)
ret void
}
define arm_aapcs_vfpcc void @vstrb16() {
; CHECK-LABEL: vstrb16:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r7, lr}
; CHECK-NEXT: push {r7, lr}
; CHECK-NEXT: .pad #8
; CHECK-NEXT: sub sp, #8
; CHECK-NEXT: mov r0, sp
; CHECK-NEXT: vmov.i32 q0, #0x0
; CHECK-NEXT: vstrb.16 q0, [r0, #2]
; CHECK-NEXT: bl func
; CHECK-NEXT: add sp, #8
; CHECK-NEXT: pop {r7, pc}
entry:
%d = alloca [8 x i8], align 2
%g = getelementptr inbounds [8 x i8], [8 x i8]* %d, i32 0, i32 2
%b = bitcast i8* %g to <8 x i8>*
store <8 x i8> zeroinitializer, <8 x i8>* %b, align 2
%arraydecay = getelementptr inbounds [8 x i8], [8 x i8]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i8*)*)(i8* %arraydecay)
ret void
}
define arm_aapcs_vfpcc <4 x i32> @vldrw32() {
; CHECK-LABEL: vldrw32:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r7, lr}
; CHECK-NEXT: push {r7, lr}
; CHECK-NEXT: .pad #16
; CHECK-NEXT: sub sp, #16
; CHECK-NEXT: mov r0, sp
; CHECK-NEXT: bl func
; CHECK-NEXT: vldrw.u32 q0, [sp, #8]
; CHECK-NEXT: add sp, #16
; CHECK-NEXT: pop {r7, pc}
entry:
%d = alloca [4 x i32], align 2
%arraydecay = getelementptr inbounds [4 x i32], [4 x i32]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i32*)*)(i32* %arraydecay)
%g = getelementptr inbounds [4 x i32], [4 x i32]* %d, i32 0, i32 2
%b = bitcast i32* %g to <4 x i32>*
%l = load <4 x i32>, <4 x i32>* %b, align 2
ret <4 x i32> %l
}
define arm_aapcs_vfpcc <8 x i16> @vldrh16() {
; CHECK-LABEL: vldrh16:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r7, lr}
; CHECK-NEXT: push {r7, lr}
; CHECK-NEXT: .pad #16
; CHECK-NEXT: sub sp, #16
; CHECK-NEXT: mov r0, sp
; CHECK-NEXT: bl func
; CHECK-NEXT: vldrh.u16 q0, [sp, #4]
; CHECK-NEXT: add sp, #16
; CHECK-NEXT: pop {r7, pc}
entry:
%d = alloca [8 x i16], align 2
%arraydecay = getelementptr inbounds [8 x i16], [8 x i16]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i16*)*)(i16* %arraydecay)
%g = getelementptr inbounds [8 x i16], [8 x i16]* %d, i32 0, i32 2
%b = bitcast i16* %g to <8 x i16>*
%l = load <8 x i16>, <8 x i16>* %b, align 2
ret <8 x i16> %l
}
define arm_aapcs_vfpcc <16 x i8> @vldrb8() {
; CHECK-LABEL: vldrb8:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r7, lr}
; CHECK-NEXT: push {r7, lr}
; CHECK-NEXT: .pad #16
; CHECK-NEXT: sub sp, #16
; CHECK-NEXT: mov r0, sp
; CHECK-NEXT: bl func
; CHECK-NEXT: vldrh.u16 q0, [sp, #2]
; CHECK-NEXT: add sp, #16
; CHECK-NEXT: pop {r7, pc}
entry:
%d = alloca [16 x i8], align 2
%arraydecay = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i8*)*)(i8* %arraydecay)
%g = getelementptr inbounds [16 x i8], [16 x i8]* %d, i32 0, i32 2
%b = bitcast i8* %g to <16 x i8>*
%l = load <16 x i8>, <16 x i8>* %b, align 2
ret <16 x i8> %l
}
define arm_aapcs_vfpcc <4 x i16> @vldrh32() {
; CHECK-LABEL: vldrh32:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r4, lr}
; CHECK-NEXT: push {r4, lr}
; CHECK-NEXT: .pad #8
; CHECK-NEXT: sub sp, #8
; CHECK-NEXT: mov r4, sp
; CHECK-NEXT: mov r0, r4
; CHECK-NEXT: bl func
; CHECK-NEXT: vldrh.u32 q0, [r4, #4]
; CHECK-NEXT: add sp, #8
; CHECK-NEXT: pop {r4, pc}
entry:
%d = alloca [4 x i16], align 2
%arraydecay = getelementptr inbounds [4 x i16], [4 x i16]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i16*)*)(i16* %arraydecay)
%g = getelementptr inbounds [4 x i16], [4 x i16]* %d, i32 0, i32 2
%b = bitcast i16* %g to <4 x i16>*
%l = load <4 x i16>, <4 x i16>* %b, align 2
ret <4 x i16> %l
}
define arm_aapcs_vfpcc <4 x i8> @vldrb32() {
; CHECK-LABEL: vldrb32:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r4, lr}
; CHECK-NEXT: push {r4, lr}
; CHECK-NEXT: .pad #8
; CHECK-NEXT: sub sp, #8
; CHECK-NEXT: add r4, sp, #4
; CHECK-NEXT: mov r0, r4
; CHECK-NEXT: bl func
; CHECK-NEXT: vldrb.u32 q0, [r4, #2]
; CHECK-NEXT: add sp, #8
; CHECK-NEXT: pop {r4, pc}
entry:
%d = alloca [4 x i8], align 2
%arraydecay = getelementptr inbounds [4 x i8], [4 x i8]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i8*)*)(i8* %arraydecay)
%g = getelementptr inbounds [4 x i8], [4 x i8]* %d, i32 0, i32 2
%b = bitcast i8* %g to <4 x i8>*
%l = load <4 x i8>, <4 x i8>* %b, align 2
ret <4 x i8> %l
}
define arm_aapcs_vfpcc <8 x i8> @vldrb16() {
; CHECK-LABEL: vldrb16:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: .save {r4, lr}
; CHECK-NEXT: push {r4, lr}
; CHECK-NEXT: .pad #8
; CHECK-NEXT: sub sp, #8
; CHECK-NEXT: mov r4, sp
; CHECK-NEXT: mov r0, r4
; CHECK-NEXT: bl func
; CHECK-NEXT: vldrb.u16 q0, [r4, #2]
; CHECK-NEXT: add sp, #8
; CHECK-NEXT: pop {r4, pc}
entry:
%d = alloca [8 x i8], align 2
%arraydecay = getelementptr inbounds [8 x i8], [8 x i8]* %d, i32 0, i32 0
call arm_aapcs_vfpcc void bitcast (void (...)* @func to void (i8*)*)(i8* %arraydecay)
%g = getelementptr inbounds [8 x i8], [8 x i8]* %d, i32 0, i32 2
%b = bitcast i8* %g to <8 x i8>*
%l = load <8 x i8>, <8 x i8>* %b, align 2
ret <8 x i8> %l
}
declare dso_local arm_aapcs_vfpcc void @func(...)
|