1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -mtriple=riscv32 -mattr=+v -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s
3 ; RUN: opt < %s -mtriple=riscv64 -mattr=+v -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s
4 ; RUN: opt < %s -mtriple=riscv32 -mattr=+v -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output | FileCheck %s --check-prefix=SIZE
5 ; RUN: opt < %s -mtriple=riscv64 -mattr=+v -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output | FileCheck %s --check-prefix=SIZE
7 declare i8 @llvm.vector.reduce.add.nxv1i8(<vscale x 1 x i8>)
9 define signext i8 @vreduce_add_nxv1i8(<vscale x 1 x i8> %v) {
10 ; CHECK-LABEL: 'vreduce_add_nxv1i8'
11 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv1i8(<vscale x 1 x i8> %v)
12 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
14 ; SIZE-LABEL: 'vreduce_add_nxv1i8'
15 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv1i8(<vscale x 1 x i8> %v)
16 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
18 %red = call i8 @llvm.vector.reduce.add.nxv1i8(<vscale x 1 x i8> %v)
22 declare i8 @llvm.vector.reduce.umax.nxv1i8(<vscale x 1 x i8>)
24 define signext i8 @vreduce_umax_nxv1i8(<vscale x 1 x i8> %v) {
25 ; CHECK-LABEL: 'vreduce_umax_nxv1i8'
26 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv1i8(<vscale x 1 x i8> %v)
27 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
29 ; SIZE-LABEL: 'vreduce_umax_nxv1i8'
30 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv1i8(<vscale x 1 x i8> %v)
31 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
33 %red = call i8 @llvm.vector.reduce.umax.nxv1i8(<vscale x 1 x i8> %v)
37 declare i8 @llvm.vector.reduce.smax.nxv1i8(<vscale x 1 x i8>)
39 define signext i8 @vreduce_smax_nxv1i8(<vscale x 1 x i8> %v) {
40 ; CHECK-LABEL: 'vreduce_smax_nxv1i8'
41 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv1i8(<vscale x 1 x i8> %v)
42 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
44 ; SIZE-LABEL: 'vreduce_smax_nxv1i8'
45 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv1i8(<vscale x 1 x i8> %v)
46 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
48 %red = call i8 @llvm.vector.reduce.smax.nxv1i8(<vscale x 1 x i8> %v)
52 declare i8 @llvm.vector.reduce.umin.nxv1i8(<vscale x 1 x i8>)
54 define signext i8 @vreduce_umin_nxv1i8(<vscale x 1 x i8> %v) {
55 ; CHECK-LABEL: 'vreduce_umin_nxv1i8'
56 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv1i8(<vscale x 1 x i8> %v)
57 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
59 ; SIZE-LABEL: 'vreduce_umin_nxv1i8'
60 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv1i8(<vscale x 1 x i8> %v)
61 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
63 %red = call i8 @llvm.vector.reduce.umin.nxv1i8(<vscale x 1 x i8> %v)
67 declare i8 @llvm.vector.reduce.smin.nxv1i8(<vscale x 1 x i8>)
69 define signext i8 @vreduce_smin_nxv1i8(<vscale x 1 x i8> %v) {
70 ; CHECK-LABEL: 'vreduce_smin_nxv1i8'
71 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv1i8(<vscale x 1 x i8> %v)
72 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
74 ; SIZE-LABEL: 'vreduce_smin_nxv1i8'
75 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv1i8(<vscale x 1 x i8> %v)
76 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
78 %red = call i8 @llvm.vector.reduce.smin.nxv1i8(<vscale x 1 x i8> %v)
82 declare i8 @llvm.vector.reduce.and.nxv1i8(<vscale x 1 x i8>)
84 define signext i8 @vreduce_and_nxv1i8(<vscale x 1 x i8> %v) {
85 ; CHECK-LABEL: 'vreduce_and_nxv1i8'
86 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv1i8(<vscale x 1 x i8> %v)
87 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
89 ; SIZE-LABEL: 'vreduce_and_nxv1i8'
90 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv1i8(<vscale x 1 x i8> %v)
91 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
93 %red = call i8 @llvm.vector.reduce.and.nxv1i8(<vscale x 1 x i8> %v)
97 declare i8 @llvm.vector.reduce.or.nxv1i8(<vscale x 1 x i8>)
99 define signext i8 @vreduce_or_nxv1i8(<vscale x 1 x i8> %v) {
100 ; CHECK-LABEL: 'vreduce_or_nxv1i8'
101 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv1i8(<vscale x 1 x i8> %v)
102 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
104 ; SIZE-LABEL: 'vreduce_or_nxv1i8'
105 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv1i8(<vscale x 1 x i8> %v)
106 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
108 %red = call i8 @llvm.vector.reduce.or.nxv1i8(<vscale x 1 x i8> %v)
112 declare i8 @llvm.vector.reduce.xor.nxv1i8(<vscale x 1 x i8>)
114 define signext i8 @vreduce_xor_nxv1i8(<vscale x 1 x i8> %v) {
115 ; CHECK-LABEL: 'vreduce_xor_nxv1i8'
116 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv1i8(<vscale x 1 x i8> %v)
117 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
119 ; SIZE-LABEL: 'vreduce_xor_nxv1i8'
120 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv1i8(<vscale x 1 x i8> %v)
121 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
123 %red = call i8 @llvm.vector.reduce.xor.nxv1i8(<vscale x 1 x i8> %v)
127 declare i8 @llvm.vector.reduce.add.nxv2i8(<vscale x 2 x i8>)
129 define signext i8 @vreduce_add_nxv2i8(<vscale x 2 x i8> %v) {
130 ; CHECK-LABEL: 'vreduce_add_nxv2i8'
131 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv2i8(<vscale x 2 x i8> %v)
132 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
134 ; SIZE-LABEL: 'vreduce_add_nxv2i8'
135 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv2i8(<vscale x 2 x i8> %v)
136 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
138 %red = call i8 @llvm.vector.reduce.add.nxv2i8(<vscale x 2 x i8> %v)
142 declare i8 @llvm.vector.reduce.umax.nxv2i8(<vscale x 2 x i8>)
144 define signext i8 @vreduce_umax_nxv2i8(<vscale x 2 x i8> %v) {
145 ; CHECK-LABEL: 'vreduce_umax_nxv2i8'
146 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv2i8(<vscale x 2 x i8> %v)
147 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
149 ; SIZE-LABEL: 'vreduce_umax_nxv2i8'
150 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv2i8(<vscale x 2 x i8> %v)
151 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
153 %red = call i8 @llvm.vector.reduce.umax.nxv2i8(<vscale x 2 x i8> %v)
157 declare i8 @llvm.vector.reduce.smax.nxv2i8(<vscale x 2 x i8>)
159 define signext i8 @vreduce_smax_nxv2i8(<vscale x 2 x i8> %v) {
160 ; CHECK-LABEL: 'vreduce_smax_nxv2i8'
161 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv2i8(<vscale x 2 x i8> %v)
162 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
164 ; SIZE-LABEL: 'vreduce_smax_nxv2i8'
165 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv2i8(<vscale x 2 x i8> %v)
166 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
168 %red = call i8 @llvm.vector.reduce.smax.nxv2i8(<vscale x 2 x i8> %v)
172 declare i8 @llvm.vector.reduce.umin.nxv2i8(<vscale x 2 x i8>)
174 define signext i8 @vreduce_umin_nxv2i8(<vscale x 2 x i8> %v) {
175 ; CHECK-LABEL: 'vreduce_umin_nxv2i8'
176 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv2i8(<vscale x 2 x i8> %v)
177 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
179 ; SIZE-LABEL: 'vreduce_umin_nxv2i8'
180 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv2i8(<vscale x 2 x i8> %v)
181 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
183 %red = call i8 @llvm.vector.reduce.umin.nxv2i8(<vscale x 2 x i8> %v)
187 declare i8 @llvm.vector.reduce.smin.nxv2i8(<vscale x 2 x i8>)
189 define signext i8 @vreduce_smin_nxv2i8(<vscale x 2 x i8> %v) {
190 ; CHECK-LABEL: 'vreduce_smin_nxv2i8'
191 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv2i8(<vscale x 2 x i8> %v)
192 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
194 ; SIZE-LABEL: 'vreduce_smin_nxv2i8'
195 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv2i8(<vscale x 2 x i8> %v)
196 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
198 %red = call i8 @llvm.vector.reduce.smin.nxv2i8(<vscale x 2 x i8> %v)
202 declare i8 @llvm.vector.reduce.and.nxv2i8(<vscale x 2 x i8>)
204 define signext i8 @vreduce_and_nxv2i8(<vscale x 2 x i8> %v) {
205 ; CHECK-LABEL: 'vreduce_and_nxv2i8'
206 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv2i8(<vscale x 2 x i8> %v)
207 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
209 ; SIZE-LABEL: 'vreduce_and_nxv2i8'
210 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv2i8(<vscale x 2 x i8> %v)
211 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
213 %red = call i8 @llvm.vector.reduce.and.nxv2i8(<vscale x 2 x i8> %v)
217 declare i8 @llvm.vector.reduce.or.nxv2i8(<vscale x 2 x i8>)
219 define signext i8 @vreduce_or_nxv2i8(<vscale x 2 x i8> %v) {
220 ; CHECK-LABEL: 'vreduce_or_nxv2i8'
221 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv2i8(<vscale x 2 x i8> %v)
222 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
224 ; SIZE-LABEL: 'vreduce_or_nxv2i8'
225 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv2i8(<vscale x 2 x i8> %v)
226 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
228 %red = call i8 @llvm.vector.reduce.or.nxv2i8(<vscale x 2 x i8> %v)
232 declare i8 @llvm.vector.reduce.xor.nxv2i8(<vscale x 2 x i8>)
234 define signext i8 @vreduce_xor_nxv2i8(<vscale x 2 x i8> %v) {
235 ; CHECK-LABEL: 'vreduce_xor_nxv2i8'
236 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv2i8(<vscale x 2 x i8> %v)
237 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
239 ; SIZE-LABEL: 'vreduce_xor_nxv2i8'
240 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv2i8(<vscale x 2 x i8> %v)
241 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
243 %red = call i8 @llvm.vector.reduce.xor.nxv2i8(<vscale x 2 x i8> %v)
247 declare i8 @llvm.vector.reduce.add.nxv4i8(<vscale x 4 x i8>)
249 define signext i8 @vreduce_add_nxv4i8(<vscale x 4 x i8> %v) {
250 ; CHECK-LABEL: 'vreduce_add_nxv4i8'
251 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv4i8(<vscale x 4 x i8> %v)
252 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
254 ; SIZE-LABEL: 'vreduce_add_nxv4i8'
255 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv4i8(<vscale x 4 x i8> %v)
256 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
258 %red = call i8 @llvm.vector.reduce.add.nxv4i8(<vscale x 4 x i8> %v)
262 declare i8 @llvm.vector.reduce.umax.nxv4i8(<vscale x 4 x i8>)
264 define signext i8 @vreduce_umax_nxv4i8(<vscale x 4 x i8> %v) {
265 ; CHECK-LABEL: 'vreduce_umax_nxv4i8'
266 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv4i8(<vscale x 4 x i8> %v)
267 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
269 ; SIZE-LABEL: 'vreduce_umax_nxv4i8'
270 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv4i8(<vscale x 4 x i8> %v)
271 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
273 %red = call i8 @llvm.vector.reduce.umax.nxv4i8(<vscale x 4 x i8> %v)
277 declare i8 @llvm.vector.reduce.smax.nxv4i8(<vscale x 4 x i8>)
279 define signext i8 @vreduce_smax_nxv4i8(<vscale x 4 x i8> %v) {
280 ; CHECK-LABEL: 'vreduce_smax_nxv4i8'
281 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv4i8(<vscale x 4 x i8> %v)
282 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
284 ; SIZE-LABEL: 'vreduce_smax_nxv4i8'
285 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv4i8(<vscale x 4 x i8> %v)
286 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
288 %red = call i8 @llvm.vector.reduce.smax.nxv4i8(<vscale x 4 x i8> %v)
292 declare i8 @llvm.vector.reduce.umin.nxv4i8(<vscale x 4 x i8>)
294 define signext i8 @vreduce_umin_nxv4i8(<vscale x 4 x i8> %v) {
295 ; CHECK-LABEL: 'vreduce_umin_nxv4i8'
296 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv4i8(<vscale x 4 x i8> %v)
297 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
299 ; SIZE-LABEL: 'vreduce_umin_nxv4i8'
300 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv4i8(<vscale x 4 x i8> %v)
301 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
303 %red = call i8 @llvm.vector.reduce.umin.nxv4i8(<vscale x 4 x i8> %v)
307 declare i8 @llvm.vector.reduce.smin.nxv4i8(<vscale x 4 x i8>)
309 define signext i8 @vreduce_smin_nxv4i8(<vscale x 4 x i8> %v) {
310 ; CHECK-LABEL: 'vreduce_smin_nxv4i8'
311 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv4i8(<vscale x 4 x i8> %v)
312 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
314 ; SIZE-LABEL: 'vreduce_smin_nxv4i8'
315 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv4i8(<vscale x 4 x i8> %v)
316 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
318 %red = call i8 @llvm.vector.reduce.smin.nxv4i8(<vscale x 4 x i8> %v)
322 declare i8 @llvm.vector.reduce.and.nxv4i8(<vscale x 4 x i8>)
324 define signext i8 @vreduce_and_nxv4i8(<vscale x 4 x i8> %v) {
325 ; CHECK-LABEL: 'vreduce_and_nxv4i8'
326 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv4i8(<vscale x 4 x i8> %v)
327 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
329 ; SIZE-LABEL: 'vreduce_and_nxv4i8'
330 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv4i8(<vscale x 4 x i8> %v)
331 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
333 %red = call i8 @llvm.vector.reduce.and.nxv4i8(<vscale x 4 x i8> %v)
337 declare i8 @llvm.vector.reduce.or.nxv4i8(<vscale x 4 x i8>)
339 define signext i8 @vreduce_or_nxv4i8(<vscale x 4 x i8> %v) {
340 ; CHECK-LABEL: 'vreduce_or_nxv4i8'
341 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv4i8(<vscale x 4 x i8> %v)
342 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
344 ; SIZE-LABEL: 'vreduce_or_nxv4i8'
345 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv4i8(<vscale x 4 x i8> %v)
346 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
348 %red = call i8 @llvm.vector.reduce.or.nxv4i8(<vscale x 4 x i8> %v)
352 declare i8 @llvm.vector.reduce.xor.nxv4i8(<vscale x 4 x i8>)
354 define signext i8 @vreduce_xor_nxv4i8(<vscale x 4 x i8> %v) {
355 ; CHECK-LABEL: 'vreduce_xor_nxv4i8'
356 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv4i8(<vscale x 4 x i8> %v)
357 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %red
359 ; SIZE-LABEL: 'vreduce_xor_nxv4i8'
360 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv4i8(<vscale x 4 x i8> %v)
361 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red
363 %red = call i8 @llvm.vector.reduce.xor.nxv4i8(<vscale x 4 x i8> %v)
367 declare i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16>)
369 define signext i16 @vreduce_add_nxv1i16(<vscale x 1 x i16> %v) {
370 ; CHECK-LABEL: 'vreduce_add_nxv1i16'
371 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %v)
372 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
374 ; SIZE-LABEL: 'vreduce_add_nxv1i16'
375 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %v)
376 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
378 %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %v)
382 define signext i16 @vwreduce_add_nxv1i8(<vscale x 1 x i8> %v) {
383 ; CHECK-LABEL: 'vwreduce_add_nxv1i8'
384 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>
385 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)
386 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
388 ; SIZE-LABEL: 'vwreduce_add_nxv1i8'
389 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>
390 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)
391 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
393 %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>
394 %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)
398 define signext i16 @vwreduce_uadd_nxv1i8(<vscale x 1 x i8> %v) {
399 ; CHECK-LABEL: 'vwreduce_uadd_nxv1i8'
400 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>
401 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)
402 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
404 ; SIZE-LABEL: 'vwreduce_uadd_nxv1i8'
405 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>
406 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)
407 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
409 %e = sext <vscale x 1 x i8> %v to <vscale x 1 x i16>
410 %red = call i16 @llvm.vector.reduce.add.nxv1i16(<vscale x 1 x i16> %e)
414 declare i16 @llvm.vector.reduce.umax.nxv1i16(<vscale x 1 x i16>)
416 define signext i16 @vreduce_umax_nxv1i16(<vscale x 1 x i16> %v) {
417 ; CHECK-LABEL: 'vreduce_umax_nxv1i16'
418 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv1i16(<vscale x 1 x i16> %v)
419 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
421 ; SIZE-LABEL: 'vreduce_umax_nxv1i16'
422 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv1i16(<vscale x 1 x i16> %v)
423 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
425 %red = call i16 @llvm.vector.reduce.umax.nxv1i16(<vscale x 1 x i16> %v)
429 declare i16 @llvm.vector.reduce.smax.nxv1i16(<vscale x 1 x i16>)
431 define signext i16 @vreduce_smax_nxv1i16(<vscale x 1 x i16> %v) {
432 ; CHECK-LABEL: 'vreduce_smax_nxv1i16'
433 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv1i16(<vscale x 1 x i16> %v)
434 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
436 ; SIZE-LABEL: 'vreduce_smax_nxv1i16'
437 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv1i16(<vscale x 1 x i16> %v)
438 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
440 %red = call i16 @llvm.vector.reduce.smax.nxv1i16(<vscale x 1 x i16> %v)
444 declare i16 @llvm.vector.reduce.umin.nxv1i16(<vscale x 1 x i16>)
446 define signext i16 @vreduce_umin_nxv1i16(<vscale x 1 x i16> %v) {
447 ; CHECK-LABEL: 'vreduce_umin_nxv1i16'
448 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv1i16(<vscale x 1 x i16> %v)
449 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
451 ; SIZE-LABEL: 'vreduce_umin_nxv1i16'
452 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv1i16(<vscale x 1 x i16> %v)
453 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
455 %red = call i16 @llvm.vector.reduce.umin.nxv1i16(<vscale x 1 x i16> %v)
459 declare i16 @llvm.vector.reduce.smin.nxv1i16(<vscale x 1 x i16>)
461 define signext i16 @vreduce_smin_nxv1i16(<vscale x 1 x i16> %v) {
462 ; CHECK-LABEL: 'vreduce_smin_nxv1i16'
463 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv1i16(<vscale x 1 x i16> %v)
464 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
466 ; SIZE-LABEL: 'vreduce_smin_nxv1i16'
467 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv1i16(<vscale x 1 x i16> %v)
468 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
470 %red = call i16 @llvm.vector.reduce.smin.nxv1i16(<vscale x 1 x i16> %v)
474 declare i16 @llvm.vector.reduce.and.nxv1i16(<vscale x 1 x i16>)
476 define signext i16 @vreduce_and_nxv1i16(<vscale x 1 x i16> %v) {
477 ; CHECK-LABEL: 'vreduce_and_nxv1i16'
478 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv1i16(<vscale x 1 x i16> %v)
479 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
481 ; SIZE-LABEL: 'vreduce_and_nxv1i16'
482 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv1i16(<vscale x 1 x i16> %v)
483 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
485 %red = call i16 @llvm.vector.reduce.and.nxv1i16(<vscale x 1 x i16> %v)
489 declare i16 @llvm.vector.reduce.or.nxv1i16(<vscale x 1 x i16>)
491 define signext i16 @vreduce_or_nxv1i16(<vscale x 1 x i16> %v) {
492 ; CHECK-LABEL: 'vreduce_or_nxv1i16'
493 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv1i16(<vscale x 1 x i16> %v)
494 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
496 ; SIZE-LABEL: 'vreduce_or_nxv1i16'
497 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv1i16(<vscale x 1 x i16> %v)
498 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
500 %red = call i16 @llvm.vector.reduce.or.nxv1i16(<vscale x 1 x i16> %v)
504 declare i16 @llvm.vector.reduce.xor.nxv1i16(<vscale x 1 x i16>)
506 define signext i16 @vreduce_xor_nxv1i16(<vscale x 1 x i16> %v) {
507 ; CHECK-LABEL: 'vreduce_xor_nxv1i16'
508 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv1i16(<vscale x 1 x i16> %v)
509 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
511 ; SIZE-LABEL: 'vreduce_xor_nxv1i16'
512 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv1i16(<vscale x 1 x i16> %v)
513 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
515 %red = call i16 @llvm.vector.reduce.xor.nxv1i16(<vscale x 1 x i16> %v)
519 declare i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16>)
521 define signext i16 @vreduce_add_nxv2i16(<vscale x 2 x i16> %v) {
522 ; CHECK-LABEL: 'vreduce_add_nxv2i16'
523 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %v)
524 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
526 ; SIZE-LABEL: 'vreduce_add_nxv2i16'
527 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %v)
528 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
530 %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %v)
534 define signext i16 @vwreduce_add_nxv2i8(<vscale x 2 x i8> %v) {
535 ; CHECK-LABEL: 'vwreduce_add_nxv2i8'
536 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>
537 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)
538 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
540 ; SIZE-LABEL: 'vwreduce_add_nxv2i8'
541 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>
542 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)
543 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
545 %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>
546 %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)
550 define signext i16 @vwreduce_uadd_nxv2i8(<vscale x 2 x i8> %v) {
551 ; CHECK-LABEL: 'vwreduce_uadd_nxv2i8'
552 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>
553 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)
554 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
556 ; SIZE-LABEL: 'vwreduce_uadd_nxv2i8'
557 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>
558 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)
559 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
561 %e = sext <vscale x 2 x i8> %v to <vscale x 2 x i16>
562 %red = call i16 @llvm.vector.reduce.add.nxv2i16(<vscale x 2 x i16> %e)
566 declare i16 @llvm.vector.reduce.umax.nxv2i16(<vscale x 2 x i16>)
568 define signext i16 @vreduce_umax_nxv2i16(<vscale x 2 x i16> %v) {
569 ; CHECK-LABEL: 'vreduce_umax_nxv2i16'
570 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv2i16(<vscale x 2 x i16> %v)
571 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
573 ; SIZE-LABEL: 'vreduce_umax_nxv2i16'
574 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv2i16(<vscale x 2 x i16> %v)
575 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
577 %red = call i16 @llvm.vector.reduce.umax.nxv2i16(<vscale x 2 x i16> %v)
581 declare i16 @llvm.vector.reduce.smax.nxv2i16(<vscale x 2 x i16>)
583 define signext i16 @vreduce_smax_nxv2i16(<vscale x 2 x i16> %v) {
584 ; CHECK-LABEL: 'vreduce_smax_nxv2i16'
585 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv2i16(<vscale x 2 x i16> %v)
586 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
588 ; SIZE-LABEL: 'vreduce_smax_nxv2i16'
589 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv2i16(<vscale x 2 x i16> %v)
590 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
592 %red = call i16 @llvm.vector.reduce.smax.nxv2i16(<vscale x 2 x i16> %v)
596 declare i16 @llvm.vector.reduce.umin.nxv2i16(<vscale x 2 x i16>)
598 define signext i16 @vreduce_umin_nxv2i16(<vscale x 2 x i16> %v) {
599 ; CHECK-LABEL: 'vreduce_umin_nxv2i16'
600 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv2i16(<vscale x 2 x i16> %v)
601 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
603 ; SIZE-LABEL: 'vreduce_umin_nxv2i16'
604 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv2i16(<vscale x 2 x i16> %v)
605 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
607 %red = call i16 @llvm.vector.reduce.umin.nxv2i16(<vscale x 2 x i16> %v)
611 declare i16 @llvm.vector.reduce.smin.nxv2i16(<vscale x 2 x i16>)
613 define signext i16 @vreduce_smin_nxv2i16(<vscale x 2 x i16> %v) {
614 ; CHECK-LABEL: 'vreduce_smin_nxv2i16'
615 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv2i16(<vscale x 2 x i16> %v)
616 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
618 ; SIZE-LABEL: 'vreduce_smin_nxv2i16'
619 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv2i16(<vscale x 2 x i16> %v)
620 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
622 %red = call i16 @llvm.vector.reduce.smin.nxv2i16(<vscale x 2 x i16> %v)
626 declare i16 @llvm.vector.reduce.and.nxv2i16(<vscale x 2 x i16>)
628 define signext i16 @vreduce_and_nxv2i16(<vscale x 2 x i16> %v) {
629 ; CHECK-LABEL: 'vreduce_and_nxv2i16'
630 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv2i16(<vscale x 2 x i16> %v)
631 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
633 ; SIZE-LABEL: 'vreduce_and_nxv2i16'
634 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv2i16(<vscale x 2 x i16> %v)
635 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
637 %red = call i16 @llvm.vector.reduce.and.nxv2i16(<vscale x 2 x i16> %v)
641 declare i16 @llvm.vector.reduce.or.nxv2i16(<vscale x 2 x i16>)
643 define signext i16 @vreduce_or_nxv2i16(<vscale x 2 x i16> %v) {
644 ; CHECK-LABEL: 'vreduce_or_nxv2i16'
645 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv2i16(<vscale x 2 x i16> %v)
646 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
648 ; SIZE-LABEL: 'vreduce_or_nxv2i16'
649 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv2i16(<vscale x 2 x i16> %v)
650 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
652 %red = call i16 @llvm.vector.reduce.or.nxv2i16(<vscale x 2 x i16> %v)
656 declare i16 @llvm.vector.reduce.xor.nxv2i16(<vscale x 2 x i16>)
658 define signext i16 @vreduce_xor_nxv2i16(<vscale x 2 x i16> %v) {
659 ; CHECK-LABEL: 'vreduce_xor_nxv2i16'
660 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv2i16(<vscale x 2 x i16> %v)
661 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
663 ; SIZE-LABEL: 'vreduce_xor_nxv2i16'
664 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv2i16(<vscale x 2 x i16> %v)
665 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
667 %red = call i16 @llvm.vector.reduce.xor.nxv2i16(<vscale x 2 x i16> %v)
671 declare i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16>)
673 define signext i16 @vreduce_add_nxv4i16(<vscale x 4 x i16> %v) {
674 ; CHECK-LABEL: 'vreduce_add_nxv4i16'
675 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %v)
676 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
678 ; SIZE-LABEL: 'vreduce_add_nxv4i16'
679 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %v)
680 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
682 %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %v)
686 define signext i16 @vwreduce_add_nxv4i8(<vscale x 4 x i8> %v) {
687 ; CHECK-LABEL: 'vwreduce_add_nxv4i8'
688 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>
689 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)
690 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
692 ; SIZE-LABEL: 'vwreduce_add_nxv4i8'
693 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>
694 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)
695 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
697 %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>
698 %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)
702 define signext i16 @vwreduce_uadd_nxv4i8(<vscale x 4 x i8> %v) {
703 ; CHECK-LABEL: 'vwreduce_uadd_nxv4i8'
704 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>
705 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)
706 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
708 ; SIZE-LABEL: 'vwreduce_uadd_nxv4i8'
709 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>
710 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)
711 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
713 %e = sext <vscale x 4 x i8> %v to <vscale x 4 x i16>
714 %red = call i16 @llvm.vector.reduce.add.nxv4i16(<vscale x 4 x i16> %e)
718 declare i16 @llvm.vector.reduce.umax.nxv4i16(<vscale x 4 x i16>)
720 define signext i16 @vreduce_umax_nxv4i16(<vscale x 4 x i16> %v) {
721 ; CHECK-LABEL: 'vreduce_umax_nxv4i16'
722 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv4i16(<vscale x 4 x i16> %v)
723 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
725 ; SIZE-LABEL: 'vreduce_umax_nxv4i16'
726 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv4i16(<vscale x 4 x i16> %v)
727 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
729 %red = call i16 @llvm.vector.reduce.umax.nxv4i16(<vscale x 4 x i16> %v)
733 declare i16 @llvm.vector.reduce.smax.nxv4i16(<vscale x 4 x i16>)
735 define signext i16 @vreduce_smax_nxv4i16(<vscale x 4 x i16> %v) {
736 ; CHECK-LABEL: 'vreduce_smax_nxv4i16'
737 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv4i16(<vscale x 4 x i16> %v)
738 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
740 ; SIZE-LABEL: 'vreduce_smax_nxv4i16'
741 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv4i16(<vscale x 4 x i16> %v)
742 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
744 %red = call i16 @llvm.vector.reduce.smax.nxv4i16(<vscale x 4 x i16> %v)
748 declare i16 @llvm.vector.reduce.umin.nxv4i16(<vscale x 4 x i16>)
750 define signext i16 @vreduce_umin_nxv4i16(<vscale x 4 x i16> %v) {
751 ; CHECK-LABEL: 'vreduce_umin_nxv4i16'
752 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv4i16(<vscale x 4 x i16> %v)
753 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
755 ; SIZE-LABEL: 'vreduce_umin_nxv4i16'
756 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv4i16(<vscale x 4 x i16> %v)
757 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
759 %red = call i16 @llvm.vector.reduce.umin.nxv4i16(<vscale x 4 x i16> %v)
763 declare i16 @llvm.vector.reduce.smin.nxv4i16(<vscale x 4 x i16>)
765 define signext i16 @vreduce_smin_nxv4i16(<vscale x 4 x i16> %v) {
766 ; CHECK-LABEL: 'vreduce_smin_nxv4i16'
767 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv4i16(<vscale x 4 x i16> %v)
768 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
770 ; SIZE-LABEL: 'vreduce_smin_nxv4i16'
771 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv4i16(<vscale x 4 x i16> %v)
772 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
774 %red = call i16 @llvm.vector.reduce.smin.nxv4i16(<vscale x 4 x i16> %v)
778 declare i16 @llvm.vector.reduce.and.nxv4i16(<vscale x 4 x i16>)
780 define signext i16 @vreduce_and_nxv4i16(<vscale x 4 x i16> %v) {
781 ; CHECK-LABEL: 'vreduce_and_nxv4i16'
782 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv4i16(<vscale x 4 x i16> %v)
783 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
785 ; SIZE-LABEL: 'vreduce_and_nxv4i16'
786 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv4i16(<vscale x 4 x i16> %v)
787 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
789 %red = call i16 @llvm.vector.reduce.and.nxv4i16(<vscale x 4 x i16> %v)
793 declare i16 @llvm.vector.reduce.or.nxv4i16(<vscale x 4 x i16>)
795 define signext i16 @vreduce_or_nxv4i16(<vscale x 4 x i16> %v) {
796 ; CHECK-LABEL: 'vreduce_or_nxv4i16'
797 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv4i16(<vscale x 4 x i16> %v)
798 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
800 ; SIZE-LABEL: 'vreduce_or_nxv4i16'
801 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv4i16(<vscale x 4 x i16> %v)
802 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
804 %red = call i16 @llvm.vector.reduce.or.nxv4i16(<vscale x 4 x i16> %v)
808 declare i16 @llvm.vector.reduce.xor.nxv4i16(<vscale x 4 x i16>)
810 define signext i16 @vreduce_xor_nxv4i16(<vscale x 4 x i16> %v) {
811 ; CHECK-LABEL: 'vreduce_xor_nxv4i16'
812 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv4i16(<vscale x 4 x i16> %v)
813 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %red
815 ; SIZE-LABEL: 'vreduce_xor_nxv4i16'
816 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv4i16(<vscale x 4 x i16> %v)
817 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red
819 %red = call i16 @llvm.vector.reduce.xor.nxv4i16(<vscale x 4 x i16> %v)
823 declare i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32>)
825 define signext i32 @vreduce_add_nxv1i32(<vscale x 1 x i32> %v) {
826 ; CHECK-LABEL: 'vreduce_add_nxv1i32'
827 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %v)
828 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
830 ; SIZE-LABEL: 'vreduce_add_nxv1i32'
831 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %v)
832 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
834 %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %v)
838 define signext i32 @vwreduce_add_nxv1i16(<vscale x 1 x i16> %v) {
839 ; CHECK-LABEL: 'vwreduce_add_nxv1i16'
840 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i16> %v to <vscale x 1 x i32>
841 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)
842 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
844 ; SIZE-LABEL: 'vwreduce_add_nxv1i16'
845 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i16> %v to <vscale x 1 x i32>
846 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)
847 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
849 %e = sext <vscale x 1 x i16> %v to <vscale x 1 x i32>
850 %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)
854 define signext i32 @vwreduce_uadd_nxv1i16(<vscale x 1 x i16> %v) {
855 ; CHECK-LABEL: 'vwreduce_uadd_nxv1i16'
856 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 1 x i16> %v to <vscale x 1 x i32>
857 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)
858 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
860 ; SIZE-LABEL: 'vwreduce_uadd_nxv1i16'
861 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 1 x i16> %v to <vscale x 1 x i32>
862 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)
863 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
865 %e = zext <vscale x 1 x i16> %v to <vscale x 1 x i32>
866 %red = call i32 @llvm.vector.reduce.add.nxv1i32(<vscale x 1 x i32> %e)
870 declare i32 @llvm.vector.reduce.umax.nxv1i32(<vscale x 1 x i32>)
872 define signext i32 @vreduce_umax_nxv1i32(<vscale x 1 x i32> %v) {
873 ; CHECK-LABEL: 'vreduce_umax_nxv1i32'
874 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv1i32(<vscale x 1 x i32> %v)
875 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
877 ; SIZE-LABEL: 'vreduce_umax_nxv1i32'
878 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv1i32(<vscale x 1 x i32> %v)
879 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
881 %red = call i32 @llvm.vector.reduce.umax.nxv1i32(<vscale x 1 x i32> %v)
885 declare i32 @llvm.vector.reduce.smax.nxv1i32(<vscale x 1 x i32>)
887 define signext i32 @vreduce_smax_nxv1i32(<vscale x 1 x i32> %v) {
888 ; CHECK-LABEL: 'vreduce_smax_nxv1i32'
889 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv1i32(<vscale x 1 x i32> %v)
890 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
892 ; SIZE-LABEL: 'vreduce_smax_nxv1i32'
893 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv1i32(<vscale x 1 x i32> %v)
894 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
896 %red = call i32 @llvm.vector.reduce.smax.nxv1i32(<vscale x 1 x i32> %v)
900 declare i32 @llvm.vector.reduce.umin.nxv1i32(<vscale x 1 x i32>)
902 define signext i32 @vreduce_umin_nxv1i32(<vscale x 1 x i32> %v) {
903 ; CHECK-LABEL: 'vreduce_umin_nxv1i32'
904 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv1i32(<vscale x 1 x i32> %v)
905 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
907 ; SIZE-LABEL: 'vreduce_umin_nxv1i32'
908 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv1i32(<vscale x 1 x i32> %v)
909 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
911 %red = call i32 @llvm.vector.reduce.umin.nxv1i32(<vscale x 1 x i32> %v)
915 declare i32 @llvm.vector.reduce.smin.nxv1i32(<vscale x 1 x i32>)
917 define signext i32 @vreduce_smin_nxv1i32(<vscale x 1 x i32> %v) {
918 ; CHECK-LABEL: 'vreduce_smin_nxv1i32'
919 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv1i32(<vscale x 1 x i32> %v)
920 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
922 ; SIZE-LABEL: 'vreduce_smin_nxv1i32'
923 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv1i32(<vscale x 1 x i32> %v)
924 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
926 %red = call i32 @llvm.vector.reduce.smin.nxv1i32(<vscale x 1 x i32> %v)
930 declare i32 @llvm.vector.reduce.and.nxv1i32(<vscale x 1 x i32>)
932 define signext i32 @vreduce_and_nxv1i32(<vscale x 1 x i32> %v) {
933 ; CHECK-LABEL: 'vreduce_and_nxv1i32'
934 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv1i32(<vscale x 1 x i32> %v)
935 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
937 ; SIZE-LABEL: 'vreduce_and_nxv1i32'
938 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv1i32(<vscale x 1 x i32> %v)
939 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
941 %red = call i32 @llvm.vector.reduce.and.nxv1i32(<vscale x 1 x i32> %v)
945 declare i32 @llvm.vector.reduce.or.nxv1i32(<vscale x 1 x i32>)
947 define signext i32 @vreduce_or_nxv1i32(<vscale x 1 x i32> %v) {
948 ; CHECK-LABEL: 'vreduce_or_nxv1i32'
949 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv1i32(<vscale x 1 x i32> %v)
950 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
952 ; SIZE-LABEL: 'vreduce_or_nxv1i32'
953 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv1i32(<vscale x 1 x i32> %v)
954 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
956 %red = call i32 @llvm.vector.reduce.or.nxv1i32(<vscale x 1 x i32> %v)
960 declare i32 @llvm.vector.reduce.xor.nxv1i32(<vscale x 1 x i32>)
962 define signext i32 @vreduce_xor_nxv1i32(<vscale x 1 x i32> %v) {
963 ; CHECK-LABEL: 'vreduce_xor_nxv1i32'
964 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv1i32(<vscale x 1 x i32> %v)
965 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
967 ; SIZE-LABEL: 'vreduce_xor_nxv1i32'
968 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv1i32(<vscale x 1 x i32> %v)
969 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
971 %red = call i32 @llvm.vector.reduce.xor.nxv1i32(<vscale x 1 x i32> %v)
975 declare i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32>)
977 define signext i32 @vreduce_add_nxv2i32(<vscale x 2 x i32> %v) {
978 ; CHECK-LABEL: 'vreduce_add_nxv2i32'
979 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %v)
980 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
982 ; SIZE-LABEL: 'vreduce_add_nxv2i32'
983 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %v)
984 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
986 %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %v)
990 define signext i32 @vwreduce_add_nxv2i16(<vscale x 2 x i16> %v) {
991 ; CHECK-LABEL: 'vwreduce_add_nxv2i16'
992 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i16> %v to <vscale x 2 x i32>
993 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)
994 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
996 ; SIZE-LABEL: 'vwreduce_add_nxv2i16'
997 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i16> %v to <vscale x 2 x i32>
998 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)
999 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1001 %e = sext <vscale x 2 x i16> %v to <vscale x 2 x i32>
1002 %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)
1006 define signext i32 @vwreduce_uadd_nxv2i16(<vscale x 2 x i16> %v) {
1007 ; CHECK-LABEL: 'vwreduce_uadd_nxv2i16'
1008 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 2 x i16> %v to <vscale x 2 x i32>
1009 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)
1010 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1012 ; SIZE-LABEL: 'vwreduce_uadd_nxv2i16'
1013 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 2 x i16> %v to <vscale x 2 x i32>
1014 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)
1015 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1017 %e = zext <vscale x 2 x i16> %v to <vscale x 2 x i32>
1018 %red = call i32 @llvm.vector.reduce.add.nxv2i32(<vscale x 2 x i32> %e)
1022 declare i32 @llvm.vector.reduce.umax.nxv2i32(<vscale x 2 x i32>)
1024 define signext i32 @vreduce_umax_nxv2i32(<vscale x 2 x i32> %v) {
1025 ; CHECK-LABEL: 'vreduce_umax_nxv2i32'
1026 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv2i32(<vscale x 2 x i32> %v)
1027 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1029 ; SIZE-LABEL: 'vreduce_umax_nxv2i32'
1030 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv2i32(<vscale x 2 x i32> %v)
1031 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1033 %red = call i32 @llvm.vector.reduce.umax.nxv2i32(<vscale x 2 x i32> %v)
1037 declare i32 @llvm.vector.reduce.smax.nxv2i32(<vscale x 2 x i32>)
1039 define signext i32 @vreduce_smax_nxv2i32(<vscale x 2 x i32> %v) {
1040 ; CHECK-LABEL: 'vreduce_smax_nxv2i32'
1041 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv2i32(<vscale x 2 x i32> %v)
1042 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1044 ; SIZE-LABEL: 'vreduce_smax_nxv2i32'
1045 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv2i32(<vscale x 2 x i32> %v)
1046 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1048 %red = call i32 @llvm.vector.reduce.smax.nxv2i32(<vscale x 2 x i32> %v)
1052 declare i32 @llvm.vector.reduce.umin.nxv2i32(<vscale x 2 x i32>)
1054 define signext i32 @vreduce_umin_nxv2i32(<vscale x 2 x i32> %v) {
1055 ; CHECK-LABEL: 'vreduce_umin_nxv2i32'
1056 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv2i32(<vscale x 2 x i32> %v)
1057 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1059 ; SIZE-LABEL: 'vreduce_umin_nxv2i32'
1060 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv2i32(<vscale x 2 x i32> %v)
1061 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1063 %red = call i32 @llvm.vector.reduce.umin.nxv2i32(<vscale x 2 x i32> %v)
1067 declare i32 @llvm.vector.reduce.smin.nxv2i32(<vscale x 2 x i32>)
1069 define signext i32 @vreduce_smin_nxv2i32(<vscale x 2 x i32> %v) {
1070 ; CHECK-LABEL: 'vreduce_smin_nxv2i32'
1071 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv2i32(<vscale x 2 x i32> %v)
1072 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1074 ; SIZE-LABEL: 'vreduce_smin_nxv2i32'
1075 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv2i32(<vscale x 2 x i32> %v)
1076 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1078 %red = call i32 @llvm.vector.reduce.smin.nxv2i32(<vscale x 2 x i32> %v)
1082 declare i32 @llvm.vector.reduce.and.nxv2i32(<vscale x 2 x i32>)
1084 define signext i32 @vreduce_and_nxv2i32(<vscale x 2 x i32> %v) {
1085 ; CHECK-LABEL: 'vreduce_and_nxv2i32'
1086 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv2i32(<vscale x 2 x i32> %v)
1087 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1089 ; SIZE-LABEL: 'vreduce_and_nxv2i32'
1090 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv2i32(<vscale x 2 x i32> %v)
1091 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1093 %red = call i32 @llvm.vector.reduce.and.nxv2i32(<vscale x 2 x i32> %v)
1097 declare i32 @llvm.vector.reduce.or.nxv2i32(<vscale x 2 x i32>)
1099 define signext i32 @vreduce_or_nxv2i32(<vscale x 2 x i32> %v) {
1100 ; CHECK-LABEL: 'vreduce_or_nxv2i32'
1101 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv2i32(<vscale x 2 x i32> %v)
1102 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1104 ; SIZE-LABEL: 'vreduce_or_nxv2i32'
1105 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv2i32(<vscale x 2 x i32> %v)
1106 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1108 %red = call i32 @llvm.vector.reduce.or.nxv2i32(<vscale x 2 x i32> %v)
1112 declare i32 @llvm.vector.reduce.xor.nxv2i32(<vscale x 2 x i32>)
1114 define signext i32 @vreduce_xor_nxv2i32(<vscale x 2 x i32> %v) {
1115 ; CHECK-LABEL: 'vreduce_xor_nxv2i32'
1116 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv2i32(<vscale x 2 x i32> %v)
1117 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1119 ; SIZE-LABEL: 'vreduce_xor_nxv2i32'
1120 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv2i32(<vscale x 2 x i32> %v)
1121 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1123 %red = call i32 @llvm.vector.reduce.xor.nxv2i32(<vscale x 2 x i32> %v)
1127 declare i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32>)
1129 define signext i32 @vreduce_add_nxv4i32(<vscale x 4 x i32> %v) {
1130 ; CHECK-LABEL: 'vreduce_add_nxv4i32'
1131 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %v)
1132 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1134 ; SIZE-LABEL: 'vreduce_add_nxv4i32'
1135 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %v)
1136 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1138 %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %v)
1142 define signext i32 @vwreduce_add_nxv4i16(<vscale x 4 x i16> %v) {
1143 ; CHECK-LABEL: 'vwreduce_add_nxv4i16'
1144 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i16> %v to <vscale x 4 x i32>
1145 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)
1146 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1148 ; SIZE-LABEL: 'vwreduce_add_nxv4i16'
1149 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i16> %v to <vscale x 4 x i32>
1150 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)
1151 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1153 %e = sext <vscale x 4 x i16> %v to <vscale x 4 x i32>
1154 %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)
1158 define signext i32 @vwreduce_uadd_nxv4i16(<vscale x 4 x i16> %v) {
1159 ; CHECK-LABEL: 'vwreduce_uadd_nxv4i16'
1160 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 4 x i16> %v to <vscale x 4 x i32>
1161 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)
1162 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1164 ; SIZE-LABEL: 'vwreduce_uadd_nxv4i16'
1165 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 4 x i16> %v to <vscale x 4 x i32>
1166 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)
1167 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1169 %e = zext <vscale x 4 x i16> %v to <vscale x 4 x i32>
1170 %red = call i32 @llvm.vector.reduce.add.nxv4i32(<vscale x 4 x i32> %e)
1174 declare i32 @llvm.vector.reduce.umax.nxv4i32(<vscale x 4 x i32>)
1176 define signext i32 @vreduce_umax_nxv4i32(<vscale x 4 x i32> %v) {
1177 ; CHECK-LABEL: 'vreduce_umax_nxv4i32'
1178 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv4i32(<vscale x 4 x i32> %v)
1179 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1181 ; SIZE-LABEL: 'vreduce_umax_nxv4i32'
1182 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv4i32(<vscale x 4 x i32> %v)
1183 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1185 %red = call i32 @llvm.vector.reduce.umax.nxv4i32(<vscale x 4 x i32> %v)
1189 declare i32 @llvm.vector.reduce.smax.nxv4i32(<vscale x 4 x i32>)
1191 define signext i32 @vreduce_smax_nxv4i32(<vscale x 4 x i32> %v) {
1192 ; CHECK-LABEL: 'vreduce_smax_nxv4i32'
1193 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv4i32(<vscale x 4 x i32> %v)
1194 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1196 ; SIZE-LABEL: 'vreduce_smax_nxv4i32'
1197 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv4i32(<vscale x 4 x i32> %v)
1198 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1200 %red = call i32 @llvm.vector.reduce.smax.nxv4i32(<vscale x 4 x i32> %v)
1204 declare i32 @llvm.vector.reduce.umin.nxv4i32(<vscale x 4 x i32>)
1206 define signext i32 @vreduce_umin_nxv4i32(<vscale x 4 x i32> %v) {
1207 ; CHECK-LABEL: 'vreduce_umin_nxv4i32'
1208 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv4i32(<vscale x 4 x i32> %v)
1209 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1211 ; SIZE-LABEL: 'vreduce_umin_nxv4i32'
1212 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv4i32(<vscale x 4 x i32> %v)
1213 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1215 %red = call i32 @llvm.vector.reduce.umin.nxv4i32(<vscale x 4 x i32> %v)
1219 declare i32 @llvm.vector.reduce.smin.nxv4i32(<vscale x 4 x i32>)
1221 define signext i32 @vreduce_smin_nxv4i32(<vscale x 4 x i32> %v) {
1222 ; CHECK-LABEL: 'vreduce_smin_nxv4i32'
1223 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv4i32(<vscale x 4 x i32> %v)
1224 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1226 ; SIZE-LABEL: 'vreduce_smin_nxv4i32'
1227 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv4i32(<vscale x 4 x i32> %v)
1228 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1230 %red = call i32 @llvm.vector.reduce.smin.nxv4i32(<vscale x 4 x i32> %v)
1234 declare i32 @llvm.vector.reduce.and.nxv4i32(<vscale x 4 x i32>)
1236 define signext i32 @vreduce_and_nxv4i32(<vscale x 4 x i32> %v) {
1237 ; CHECK-LABEL: 'vreduce_and_nxv4i32'
1238 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv4i32(<vscale x 4 x i32> %v)
1239 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1241 ; SIZE-LABEL: 'vreduce_and_nxv4i32'
1242 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv4i32(<vscale x 4 x i32> %v)
1243 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1245 %red = call i32 @llvm.vector.reduce.and.nxv4i32(<vscale x 4 x i32> %v)
1249 declare i32 @llvm.vector.reduce.or.nxv4i32(<vscale x 4 x i32>)
1251 define signext i32 @vreduce_or_nxv4i32(<vscale x 4 x i32> %v) {
1252 ; CHECK-LABEL: 'vreduce_or_nxv4i32'
1253 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv4i32(<vscale x 4 x i32> %v)
1254 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1256 ; SIZE-LABEL: 'vreduce_or_nxv4i32'
1257 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv4i32(<vscale x 4 x i32> %v)
1258 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1260 %red = call i32 @llvm.vector.reduce.or.nxv4i32(<vscale x 4 x i32> %v)
1264 declare i32 @llvm.vector.reduce.xor.nxv4i32(<vscale x 4 x i32>)
1266 define signext i32 @vreduce_xor_nxv4i32(<vscale x 4 x i32> %v) {
1267 ; CHECK-LABEL: 'vreduce_xor_nxv4i32'
1268 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv4i32(<vscale x 4 x i32> %v)
1269 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %red
1271 ; SIZE-LABEL: 'vreduce_xor_nxv4i32'
1272 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv4i32(<vscale x 4 x i32> %v)
1273 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red
1275 %red = call i32 @llvm.vector.reduce.xor.nxv4i32(<vscale x 4 x i32> %v)
1279 declare i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64>)
1281 define i64 @vreduce_add_nxv1i64(<vscale x 1 x i64> %v) {
1282 ; CHECK-LABEL: 'vreduce_add_nxv1i64'
1283 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %v)
1284 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1286 ; SIZE-LABEL: 'vreduce_add_nxv1i64'
1287 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %v)
1288 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1290 %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %v)
1294 define i64 @vwreduce_add_nxv1i32(<vscale x 1 x i32> %v) {
1295 ; CHECK-LABEL: 'vwreduce_add_nxv1i32'
1296 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i32> %v to <vscale x 1 x i64>
1297 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)
1298 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1300 ; SIZE-LABEL: 'vwreduce_add_nxv1i32'
1301 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 1 x i32> %v to <vscale x 1 x i64>
1302 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)
1303 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1305 %e = sext <vscale x 1 x i32> %v to <vscale x 1 x i64>
1306 %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)
1310 define i64 @vwreduce_uadd_nxv1i32(<vscale x 1 x i32> %v) {
1311 ; CHECK-LABEL: 'vwreduce_uadd_nxv1i32'
1312 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 1 x i32> %v to <vscale x 1 x i64>
1313 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)
1314 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1316 ; SIZE-LABEL: 'vwreduce_uadd_nxv1i32'
1317 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 1 x i32> %v to <vscale x 1 x i64>
1318 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)
1319 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1321 %e = zext <vscale x 1 x i32> %v to <vscale x 1 x i64>
1322 %red = call i64 @llvm.vector.reduce.add.nxv1i64(<vscale x 1 x i64> %e)
1326 declare i64 @llvm.vector.reduce.umax.nxv1i64(<vscale x 1 x i64>)
1328 define i64 @vreduce_umax_nxv1i64(<vscale x 1 x i64> %v) {
1329 ; CHECK-LABEL: 'vreduce_umax_nxv1i64'
1330 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv1i64(<vscale x 1 x i64> %v)
1331 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1333 ; SIZE-LABEL: 'vreduce_umax_nxv1i64'
1334 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv1i64(<vscale x 1 x i64> %v)
1335 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1337 %red = call i64 @llvm.vector.reduce.umax.nxv1i64(<vscale x 1 x i64> %v)
1341 declare i64 @llvm.vector.reduce.smax.nxv1i64(<vscale x 1 x i64>)
1343 define i64 @vreduce_smax_nxv1i64(<vscale x 1 x i64> %v) {
1344 ; CHECK-LABEL: 'vreduce_smax_nxv1i64'
1345 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv1i64(<vscale x 1 x i64> %v)
1346 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1348 ; SIZE-LABEL: 'vreduce_smax_nxv1i64'
1349 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv1i64(<vscale x 1 x i64> %v)
1350 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1352 %red = call i64 @llvm.vector.reduce.smax.nxv1i64(<vscale x 1 x i64> %v)
1356 declare i64 @llvm.vector.reduce.umin.nxv1i64(<vscale x 1 x i64>)
1358 define i64 @vreduce_umin_nxv1i64(<vscale x 1 x i64> %v) {
1359 ; CHECK-LABEL: 'vreduce_umin_nxv1i64'
1360 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv1i64(<vscale x 1 x i64> %v)
1361 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1363 ; SIZE-LABEL: 'vreduce_umin_nxv1i64'
1364 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv1i64(<vscale x 1 x i64> %v)
1365 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1367 %red = call i64 @llvm.vector.reduce.umin.nxv1i64(<vscale x 1 x i64> %v)
1371 declare i64 @llvm.vector.reduce.smin.nxv1i64(<vscale x 1 x i64>)
1373 define i64 @vreduce_smin_nxv1i64(<vscale x 1 x i64> %v) {
1374 ; CHECK-LABEL: 'vreduce_smin_nxv1i64'
1375 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv1i64(<vscale x 1 x i64> %v)
1376 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1378 ; SIZE-LABEL: 'vreduce_smin_nxv1i64'
1379 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv1i64(<vscale x 1 x i64> %v)
1380 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1382 %red = call i64 @llvm.vector.reduce.smin.nxv1i64(<vscale x 1 x i64> %v)
1386 declare i64 @llvm.vector.reduce.and.nxv1i64(<vscale x 1 x i64>)
1388 define i64 @vreduce_and_nxv1i64(<vscale x 1 x i64> %v) {
1389 ; CHECK-LABEL: 'vreduce_and_nxv1i64'
1390 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv1i64(<vscale x 1 x i64> %v)
1391 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1393 ; SIZE-LABEL: 'vreduce_and_nxv1i64'
1394 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv1i64(<vscale x 1 x i64> %v)
1395 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1397 %red = call i64 @llvm.vector.reduce.and.nxv1i64(<vscale x 1 x i64> %v)
1401 declare i64 @llvm.vector.reduce.or.nxv1i64(<vscale x 1 x i64>)
1403 define i64 @vreduce_or_nxv1i64(<vscale x 1 x i64> %v) {
1404 ; CHECK-LABEL: 'vreduce_or_nxv1i64'
1405 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv1i64(<vscale x 1 x i64> %v)
1406 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1408 ; SIZE-LABEL: 'vreduce_or_nxv1i64'
1409 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv1i64(<vscale x 1 x i64> %v)
1410 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1412 %red = call i64 @llvm.vector.reduce.or.nxv1i64(<vscale x 1 x i64> %v)
1416 declare i64 @llvm.vector.reduce.xor.nxv1i64(<vscale x 1 x i64>)
1418 define i64 @vreduce_xor_nxv1i64(<vscale x 1 x i64> %v) {
1419 ; CHECK-LABEL: 'vreduce_xor_nxv1i64'
1420 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv1i64(<vscale x 1 x i64> %v)
1421 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1423 ; SIZE-LABEL: 'vreduce_xor_nxv1i64'
1424 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv1i64(<vscale x 1 x i64> %v)
1425 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1427 %red = call i64 @llvm.vector.reduce.xor.nxv1i64(<vscale x 1 x i64> %v)
1431 declare i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64>)
1433 define i64 @vreduce_add_nxv2i64(<vscale x 2 x i64> %v) {
1434 ; CHECK-LABEL: 'vreduce_add_nxv2i64'
1435 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %v)
1436 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1438 ; SIZE-LABEL: 'vreduce_add_nxv2i64'
1439 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %v)
1440 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1442 %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %v)
1446 define i64 @vwreduce_add_nxv2i32(<vscale x 2 x i32> %v) {
1447 ; CHECK-LABEL: 'vwreduce_add_nxv2i32'
1448 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i32> %v to <vscale x 2 x i64>
1449 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)
1450 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1452 ; SIZE-LABEL: 'vwreduce_add_nxv2i32'
1453 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 2 x i32> %v to <vscale x 2 x i64>
1454 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)
1455 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1457 %e = sext <vscale x 2 x i32> %v to <vscale x 2 x i64>
1458 %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)
1462 define i64 @vwreduce_uadd_nxv2i32(<vscale x 2 x i32> %v) {
1463 ; CHECK-LABEL: 'vwreduce_uadd_nxv2i32'
1464 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 2 x i32> %v to <vscale x 2 x i64>
1465 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)
1466 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1468 ; SIZE-LABEL: 'vwreduce_uadd_nxv2i32'
1469 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 2 x i32> %v to <vscale x 2 x i64>
1470 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)
1471 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1473 %e = zext <vscale x 2 x i32> %v to <vscale x 2 x i64>
1474 %red = call i64 @llvm.vector.reduce.add.nxv2i64(<vscale x 2 x i64> %e)
1478 declare i64 @llvm.vector.reduce.umax.nxv2i64(<vscale x 2 x i64>)
1480 define i64 @vreduce_umax_nxv2i64(<vscale x 2 x i64> %v) {
1481 ; CHECK-LABEL: 'vreduce_umax_nxv2i64'
1482 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv2i64(<vscale x 2 x i64> %v)
1483 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1485 ; SIZE-LABEL: 'vreduce_umax_nxv2i64'
1486 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv2i64(<vscale x 2 x i64> %v)
1487 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1489 %red = call i64 @llvm.vector.reduce.umax.nxv2i64(<vscale x 2 x i64> %v)
1493 declare i64 @llvm.vector.reduce.smax.nxv2i64(<vscale x 2 x i64>)
1495 define i64 @vreduce_smax_nxv2i64(<vscale x 2 x i64> %v) {
1496 ; CHECK-LABEL: 'vreduce_smax_nxv2i64'
1497 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv2i64(<vscale x 2 x i64> %v)
1498 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1500 ; SIZE-LABEL: 'vreduce_smax_nxv2i64'
1501 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv2i64(<vscale x 2 x i64> %v)
1502 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1504 %red = call i64 @llvm.vector.reduce.smax.nxv2i64(<vscale x 2 x i64> %v)
1508 declare i64 @llvm.vector.reduce.umin.nxv2i64(<vscale x 2 x i64>)
1510 define i64 @vreduce_umin_nxv2i64(<vscale x 2 x i64> %v) {
1511 ; CHECK-LABEL: 'vreduce_umin_nxv2i64'
1512 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv2i64(<vscale x 2 x i64> %v)
1513 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1515 ; SIZE-LABEL: 'vreduce_umin_nxv2i64'
1516 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv2i64(<vscale x 2 x i64> %v)
1517 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1519 %red = call i64 @llvm.vector.reduce.umin.nxv2i64(<vscale x 2 x i64> %v)
1523 declare i64 @llvm.vector.reduce.smin.nxv2i64(<vscale x 2 x i64>)
1525 define i64 @vreduce_smin_nxv2i64(<vscale x 2 x i64> %v) {
1526 ; CHECK-LABEL: 'vreduce_smin_nxv2i64'
1527 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv2i64(<vscale x 2 x i64> %v)
1528 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1530 ; SIZE-LABEL: 'vreduce_smin_nxv2i64'
1531 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv2i64(<vscale x 2 x i64> %v)
1532 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1534 %red = call i64 @llvm.vector.reduce.smin.nxv2i64(<vscale x 2 x i64> %v)
1538 declare i64 @llvm.vector.reduce.and.nxv2i64(<vscale x 2 x i64>)
1540 define i64 @vreduce_and_nxv2i64(<vscale x 2 x i64> %v) {
1541 ; CHECK-LABEL: 'vreduce_and_nxv2i64'
1542 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv2i64(<vscale x 2 x i64> %v)
1543 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1545 ; SIZE-LABEL: 'vreduce_and_nxv2i64'
1546 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv2i64(<vscale x 2 x i64> %v)
1547 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1549 %red = call i64 @llvm.vector.reduce.and.nxv2i64(<vscale x 2 x i64> %v)
1553 declare i64 @llvm.vector.reduce.or.nxv2i64(<vscale x 2 x i64>)
1555 define i64 @vreduce_or_nxv2i64(<vscale x 2 x i64> %v) {
1556 ; CHECK-LABEL: 'vreduce_or_nxv2i64'
1557 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv2i64(<vscale x 2 x i64> %v)
1558 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1560 ; SIZE-LABEL: 'vreduce_or_nxv2i64'
1561 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv2i64(<vscale x 2 x i64> %v)
1562 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1564 %red = call i64 @llvm.vector.reduce.or.nxv2i64(<vscale x 2 x i64> %v)
1568 declare i64 @llvm.vector.reduce.xor.nxv2i64(<vscale x 2 x i64>)
1570 define i64 @vreduce_xor_nxv2i64(<vscale x 2 x i64> %v) {
1571 ; CHECK-LABEL: 'vreduce_xor_nxv2i64'
1572 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv2i64(<vscale x 2 x i64> %v)
1573 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1575 ; SIZE-LABEL: 'vreduce_xor_nxv2i64'
1576 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv2i64(<vscale x 2 x i64> %v)
1577 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1579 %red = call i64 @llvm.vector.reduce.xor.nxv2i64(<vscale x 2 x i64> %v)
1583 declare i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64>)
1585 define i64 @vreduce_add_nxv4i64(<vscale x 4 x i64> %v) {
1586 ; CHECK-LABEL: 'vreduce_add_nxv4i64'
1587 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %v)
1588 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1590 ; SIZE-LABEL: 'vreduce_add_nxv4i64'
1591 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %v)
1592 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1594 %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %v)
1598 define i64 @vwreduce_add_nxv4i32(<vscale x 4 x i32> %v) {
1599 ; CHECK-LABEL: 'vwreduce_add_nxv4i32'
1600 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i32> %v to <vscale x 4 x i64>
1601 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)
1602 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1604 ; SIZE-LABEL: 'vwreduce_add_nxv4i32'
1605 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext <vscale x 4 x i32> %v to <vscale x 4 x i64>
1606 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)
1607 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1609 %e = sext <vscale x 4 x i32> %v to <vscale x 4 x i64>
1610 %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)
1614 define i64 @vwreduce_uadd_nxv4i32(<vscale x 4 x i32> %v) {
1615 ; CHECK-LABEL: 'vwreduce_uadd_nxv4i32'
1616 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 4 x i32> %v to <vscale x 4 x i64>
1617 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)
1618 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1620 ; SIZE-LABEL: 'vwreduce_uadd_nxv4i32'
1621 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext <vscale x 4 x i32> %v to <vscale x 4 x i64>
1622 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)
1623 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1625 %e = zext <vscale x 4 x i32> %v to <vscale x 4 x i64>
1626 %red = call i64 @llvm.vector.reduce.add.nxv4i64(<vscale x 4 x i64> %e)
1630 declare i64 @llvm.vector.reduce.umax.nxv4i64(<vscale x 4 x i64>)
1632 define i64 @vreduce_umax_nxv4i64(<vscale x 4 x i64> %v) {
1633 ; CHECK-LABEL: 'vreduce_umax_nxv4i64'
1634 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv4i64(<vscale x 4 x i64> %v)
1635 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1637 ; SIZE-LABEL: 'vreduce_umax_nxv4i64'
1638 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv4i64(<vscale x 4 x i64> %v)
1639 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1641 %red = call i64 @llvm.vector.reduce.umax.nxv4i64(<vscale x 4 x i64> %v)
1645 declare i64 @llvm.vector.reduce.smax.nxv4i64(<vscale x 4 x i64>)
1647 define i64 @vreduce_smax_nxv4i64(<vscale x 4 x i64> %v) {
1648 ; CHECK-LABEL: 'vreduce_smax_nxv4i64'
1649 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv4i64(<vscale x 4 x i64> %v)
1650 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1652 ; SIZE-LABEL: 'vreduce_smax_nxv4i64'
1653 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv4i64(<vscale x 4 x i64> %v)
1654 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1656 %red = call i64 @llvm.vector.reduce.smax.nxv4i64(<vscale x 4 x i64> %v)
1660 declare i64 @llvm.vector.reduce.umin.nxv4i64(<vscale x 4 x i64>)
1662 define i64 @vreduce_umin_nxv4i64(<vscale x 4 x i64> %v) {
1663 ; CHECK-LABEL: 'vreduce_umin_nxv4i64'
1664 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv4i64(<vscale x 4 x i64> %v)
1665 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1667 ; SIZE-LABEL: 'vreduce_umin_nxv4i64'
1668 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv4i64(<vscale x 4 x i64> %v)
1669 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1671 %red = call i64 @llvm.vector.reduce.umin.nxv4i64(<vscale x 4 x i64> %v)
1675 declare i64 @llvm.vector.reduce.smin.nxv4i64(<vscale x 4 x i64>)
1677 define i64 @vreduce_smin_nxv4i64(<vscale x 4 x i64> %v) {
1678 ; CHECK-LABEL: 'vreduce_smin_nxv4i64'
1679 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv4i64(<vscale x 4 x i64> %v)
1680 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1682 ; SIZE-LABEL: 'vreduce_smin_nxv4i64'
1683 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv4i64(<vscale x 4 x i64> %v)
1684 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1686 %red = call i64 @llvm.vector.reduce.smin.nxv4i64(<vscale x 4 x i64> %v)
1690 declare i64 @llvm.vector.reduce.and.nxv4i64(<vscale x 4 x i64>)
1692 define i64 @vreduce_and_nxv4i64(<vscale x 4 x i64> %v) {
1693 ; CHECK-LABEL: 'vreduce_and_nxv4i64'
1694 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv4i64(<vscale x 4 x i64> %v)
1695 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1697 ; SIZE-LABEL: 'vreduce_and_nxv4i64'
1698 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv4i64(<vscale x 4 x i64> %v)
1699 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1701 %red = call i64 @llvm.vector.reduce.and.nxv4i64(<vscale x 4 x i64> %v)
1705 declare i64 @llvm.vector.reduce.or.nxv4i64(<vscale x 4 x i64>)
1707 define i64 @vreduce_or_nxv4i64(<vscale x 4 x i64> %v) {
1708 ; CHECK-LABEL: 'vreduce_or_nxv4i64'
1709 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv4i64(<vscale x 4 x i64> %v)
1710 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1712 ; SIZE-LABEL: 'vreduce_or_nxv4i64'
1713 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv4i64(<vscale x 4 x i64> %v)
1714 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1716 %red = call i64 @llvm.vector.reduce.or.nxv4i64(<vscale x 4 x i64> %v)
1720 declare i64 @llvm.vector.reduce.xor.nxv4i64(<vscale x 4 x i64>)
1722 define i64 @vreduce_xor_nxv4i64(<vscale x 4 x i64> %v) {
1723 ; CHECK-LABEL: 'vreduce_xor_nxv4i64'
1724 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv4i64(<vscale x 4 x i64> %v)
1725 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %red
1727 ; SIZE-LABEL: 'vreduce_xor_nxv4i64'
1728 ; SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv4i64(<vscale x 4 x i64> %v)
1729 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red
1731 %red = call i64 @llvm.vector.reduce.xor.nxv4i64(<vscale x 4 x i64> %v)