[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / Analysis / CostModel / RISCV / reduce-scalable-fp.ll
blob963615125794524d6b26fd7b61c7961f148637a3
1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s
3 ; RUN: opt < %s -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s
4 ; RUN: opt < %s -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+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=+d,+zfh,+zvfh,+v -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output | FileCheck %s --check-prefix=SIZE
7 declare half @llvm.vector.reduce.fadd.nxv1f16(half, <vscale x 1 x half>)
9 define half @vreduce_fadd_nxv1f16(<vscale x 1 x half> %v, half %s) {
10 ; CHECK-LABEL: 'vreduce_fadd_nxv1f16'
11 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, <vscale x 1 x half> %v)
12 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
14 ; SIZE-LABEL: 'vreduce_fadd_nxv1f16'
15 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, <vscale x 1 x half> %v)
16 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
18   %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, <vscale x 1 x half> %v)
19   ret half %red
22 define half @vreduce_ord_fadd_nxv1f16(<vscale x 1 x half> %v, half %s) {
23 ; CHECK-LABEL: 'vreduce_ord_fadd_nxv1f16'
24 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv1f16(half %s, <vscale x 1 x half> %v)
25 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
27 ; SIZE-LABEL: 'vreduce_ord_fadd_nxv1f16'
28 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv1f16(half %s, <vscale x 1 x half> %v)
29 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
31   %red = call half @llvm.vector.reduce.fadd.nxv1f16(half %s, <vscale x 1 x half> %v)
32   ret half %red
35 declare half @llvm.vector.reduce.fadd.nxv2f16(half, <vscale x 2 x half>)
37 define half @vreduce_fadd_nxv2f16(<vscale x 2 x half> %v, half %s) {
38 ; CHECK-LABEL: 'vreduce_fadd_nxv2f16'
39 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv2f16(half %s, <vscale x 2 x half> %v)
40 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
42 ; SIZE-LABEL: 'vreduce_fadd_nxv2f16'
43 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv2f16(half %s, <vscale x 2 x half> %v)
44 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
46   %red = call reassoc half @llvm.vector.reduce.fadd.nxv2f16(half %s, <vscale x 2 x half> %v)
47   ret half %red
50 define half @vreduce_ord_fadd_nxv2f16(<vscale x 2 x half> %v, half %s) {
51 ; CHECK-LABEL: 'vreduce_ord_fadd_nxv2f16'
52 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv2f16(half %s, <vscale x 2 x half> %v)
53 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
55 ; SIZE-LABEL: 'vreduce_ord_fadd_nxv2f16'
56 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv2f16(half %s, <vscale x 2 x half> %v)
57 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
59   %red = call half @llvm.vector.reduce.fadd.nxv2f16(half %s, <vscale x 2 x half> %v)
60   ret half %red
63 declare half @llvm.vector.reduce.fadd.nxv4f16(half, <vscale x 4 x half>)
65 define half @vreduce_fadd_nxv4f16(<vscale x 4 x half> %v, half %s) {
66 ; CHECK-LABEL: 'vreduce_fadd_nxv4f16'
67 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv4f16(half %s, <vscale x 4 x half> %v)
68 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
70 ; SIZE-LABEL: 'vreduce_fadd_nxv4f16'
71 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv4f16(half %s, <vscale x 4 x half> %v)
72 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
74   %red = call reassoc half @llvm.vector.reduce.fadd.nxv4f16(half %s, <vscale x 4 x half> %v)
75   ret half %red
78 define half @vreduce_ord_fadd_nxv4f16(<vscale x 4 x half> %v, half %s) {
79 ; CHECK-LABEL: 'vreduce_ord_fadd_nxv4f16'
80 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv4f16(half %s, <vscale x 4 x half> %v)
81 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
83 ; SIZE-LABEL: 'vreduce_ord_fadd_nxv4f16'
84 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv4f16(half %s, <vscale x 4 x half> %v)
85 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
87   %red = call half @llvm.vector.reduce.fadd.nxv4f16(half %s, <vscale x 4 x half> %v)
88   ret half %red
91 declare float @llvm.vector.reduce.fadd.nxv1f32(float, <vscale x 1 x float>)
93 define float @vreduce_fadd_nxv1f32(<vscale x 1 x float> %v, float %s) {
94 ; CHECK-LABEL: 'vreduce_fadd_nxv1f32'
95 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %v)
96 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
98 ; SIZE-LABEL: 'vreduce_fadd_nxv1f32'
99 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %v)
100 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
102   %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %v)
103   ret float %red
106 define float @vreduce_ord_fadd_nxv1f32(<vscale x 1 x float> %v, float %s) {
107 ; CHECK-LABEL: 'vreduce_ord_fadd_nxv1f32'
108 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %v)
109 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
111 ; SIZE-LABEL: 'vreduce_ord_fadd_nxv1f32'
112 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %v)
113 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
115   %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %v)
116   ret float %red
119 define float @vreduce_fwadd_nxv1f32(<vscale x 1 x half> %v, float %s) {
120 ; CHECK-LABEL: 'vreduce_fwadd_nxv1f32'
121 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 1 x half> %v to <vscale x 1 x float>
122 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %e)
123 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
125 ; SIZE-LABEL: 'vreduce_fwadd_nxv1f32'
126 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 1 x half> %v to <vscale x 1 x float>
127 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %e)
128 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
130   %e = fpext <vscale x 1 x half> %v to <vscale x 1 x float>
131   %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %e)
132   ret float %red
135 define float @vreduce_ord_fwadd_nxv1f32(<vscale x 1 x half> %v, float %s) {
136 ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv1f32'
137 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 1 x half> %v to <vscale x 1 x float>
138 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %e)
139 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
141 ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv1f32'
142 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 1 x half> %v to <vscale x 1 x float>
143 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %e)
144 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
146   %e = fpext <vscale x 1 x half> %v to <vscale x 1 x float>
147   %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %e)
148   ret float %red
151 declare float @llvm.vector.reduce.fadd.nxv2f32(float, <vscale x 2 x float>)
153 define float @vreduce_fadd_nxv2f32(<vscale x 2 x float> %v, float %s) {
154 ; CHECK-LABEL: 'vreduce_fadd_nxv2f32'
155 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %v)
156 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
158 ; SIZE-LABEL: 'vreduce_fadd_nxv2f32'
159 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %v)
160 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
162   %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %v)
163   ret float %red
166 define float @vreduce_ord_fadd_nxv2f32(<vscale x 2 x float> %v, float %s) {
167 ; CHECK-LABEL: 'vreduce_ord_fadd_nxv2f32'
168 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %v)
169 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
171 ; SIZE-LABEL: 'vreduce_ord_fadd_nxv2f32'
172 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %v)
173 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
175   %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %v)
176   ret float %red
179 define float @vreduce_fwadd_nxv2f32(<vscale x 2 x half> %v, float %s) {
180 ; CHECK-LABEL: 'vreduce_fwadd_nxv2f32'
181 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 2 x half> %v to <vscale x 2 x float>
182 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %e)
183 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
185 ; SIZE-LABEL: 'vreduce_fwadd_nxv2f32'
186 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 2 x half> %v to <vscale x 2 x float>
187 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %e)
188 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
190   %e = fpext <vscale x 2 x half> %v to <vscale x 2 x float>
191   %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %e)
192   ret float %red
195 define float @vreduce_ord_fwadd_nxv2f32(<vscale x 2 x half> %v, float %s) {
196 ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv2f32'
197 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 2 x half> %v to <vscale x 2 x float>
198 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %e)
199 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
201 ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv2f32'
202 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 2 x half> %v to <vscale x 2 x float>
203 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %e)
204 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
206   %e = fpext <vscale x 2 x half> %v to <vscale x 2 x float>
207   %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, <vscale x 2 x float> %e)
208   ret float %red
211 declare float @llvm.vector.reduce.fadd.nxv4f32(float, <vscale x 4 x float>)
213 define float @vreduce_fadd_nxv4f32(<vscale x 4 x float> %v, float %s) {
214 ; CHECK-LABEL: 'vreduce_fadd_nxv4f32'
215 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %v)
216 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
218 ; SIZE-LABEL: 'vreduce_fadd_nxv4f32'
219 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %v)
220 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
222   %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %v)
223   ret float %red
226 define float @vreduce_ord_fadd_nxv4f32(<vscale x 4 x float> %v, float %s) {
227 ; CHECK-LABEL: 'vreduce_ord_fadd_nxv4f32'
228 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %v)
229 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
231 ; SIZE-LABEL: 'vreduce_ord_fadd_nxv4f32'
232 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %v)
233 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
235   %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %v)
236   ret float %red
239 define float @vreduce_fwadd_nxv4f32(<vscale x 4 x half> %v, float %s) {
240 ; CHECK-LABEL: 'vreduce_fwadd_nxv4f32'
241 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 4 x half> %v to <vscale x 4 x float>
242 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %e)
243 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
245 ; SIZE-LABEL: 'vreduce_fwadd_nxv4f32'
246 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 4 x half> %v to <vscale x 4 x float>
247 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %e)
248 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
250   %e = fpext <vscale x 4 x half> %v to <vscale x 4 x float>
251   %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %e)
252   ret float %red
255 define float @vreduce_ord_fwadd_nxv4f32(<vscale x 4 x half> %v, float %s) {
256 ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv4f32'
257 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 4 x half> %v to <vscale x 4 x float>
258 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %e)
259 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
261 ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv4f32'
262 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 4 x half> %v to <vscale x 4 x float>
263 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %e)
264 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
266   %e = fpext <vscale x 4 x half> %v to <vscale x 4 x float>
267   %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, <vscale x 4 x float> %e)
268   ret float %red
271 declare double @llvm.vector.reduce.fadd.nxv1f64(double, <vscale x 1 x double>)
273 define double @vreduce_fadd_nxv1f64(<vscale x 1 x double> %v, double %s) {
274 ; CHECK-LABEL: 'vreduce_fadd_nxv1f64'
275 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %v)
276 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
278 ; SIZE-LABEL: 'vreduce_fadd_nxv1f64'
279 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %v)
280 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
282   %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %v)
283   ret double %red
286 define double @vreduce_ord_fadd_nxv1f64(<vscale x 1 x double> %v, double %s) {
287 ; CHECK-LABEL: 'vreduce_ord_fadd_nxv1f64'
288 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %v)
289 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
291 ; SIZE-LABEL: 'vreduce_ord_fadd_nxv1f64'
292 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %v)
293 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
295   %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %v)
296   ret double %red
299 define double @vreduce_fwadd_nxv1f64(<vscale x 1 x float> %v, double %s) {
300 ; CHECK-LABEL: 'vreduce_fwadd_nxv1f64'
301 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 1 x float> %v to <vscale x 1 x double>
302 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %e)
303 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
305 ; SIZE-LABEL: 'vreduce_fwadd_nxv1f64'
306 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 1 x float> %v to <vscale x 1 x double>
307 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %e)
308 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
310   %e = fpext <vscale x 1 x float> %v to <vscale x 1 x double>
311   %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %e)
312   ret double %red
315 define double @vreduce_ord_fwadd_nxv1f64(<vscale x 1 x float> %v, double %s) {
316 ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv1f64'
317 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 1 x float> %v to <vscale x 1 x double>
318 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %e)
319 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
321 ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv1f64'
322 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 1 x float> %v to <vscale x 1 x double>
323 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %e)
324 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
326   %e = fpext <vscale x 1 x float> %v to <vscale x 1 x double>
327   %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, <vscale x 1 x double> %e)
328   ret double %red
331 declare double @llvm.vector.reduce.fadd.nxv2f64(double, <vscale x 2 x double>)
333 define double @vreduce_fadd_nxv2f64(<vscale x 2 x double> %v, double %s) {
334 ; CHECK-LABEL: 'vreduce_fadd_nxv2f64'
335 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %v)
336 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
338 ; SIZE-LABEL: 'vreduce_fadd_nxv2f64'
339 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %v)
340 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
342   %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %v)
343   ret double %red
346 define double @vreduce_ord_fadd_nxv2f64(<vscale x 2 x double> %v, double %s) {
347 ; CHECK-LABEL: 'vreduce_ord_fadd_nxv2f64'
348 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %v)
349 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
351 ; SIZE-LABEL: 'vreduce_ord_fadd_nxv2f64'
352 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %v)
353 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
355   %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %v)
356   ret double %red
359 define double @vreduce_fwadd_nxv2f64(<vscale x 2 x float> %v, double %s) {
360 ; CHECK-LABEL: 'vreduce_fwadd_nxv2f64'
361 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 2 x float> %v to <vscale x 2 x double>
362 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %e)
363 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
365 ; SIZE-LABEL: 'vreduce_fwadd_nxv2f64'
366 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 2 x float> %v to <vscale x 2 x double>
367 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %e)
368 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
370   %e = fpext <vscale x 2 x float> %v to <vscale x 2 x double>
371   %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %e)
372   ret double %red
375 define double @vreduce_ord_fwadd_nxv2f64(<vscale x 2 x float> %v, double %s) {
376 ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv2f64'
377 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 2 x float> %v to <vscale x 2 x double>
378 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %e)
379 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
381 ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv2f64'
382 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 2 x float> %v to <vscale x 2 x double>
383 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %e)
384 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
386   %e = fpext <vscale x 2 x float> %v to <vscale x 2 x double>
387   %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, <vscale x 2 x double> %e)
388   ret double %red
391 declare double @llvm.vector.reduce.fadd.nxv4f64(double, <vscale x 4 x double>)
393 define double @vreduce_fadd_nxv4f64(<vscale x 4 x double> %v, double %s) {
394 ; CHECK-LABEL: 'vreduce_fadd_nxv4f64'
395 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %v)
396 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
398 ; SIZE-LABEL: 'vreduce_fadd_nxv4f64'
399 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %v)
400 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
402   %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %v)
403   ret double %red
406 define double @vreduce_ord_fadd_nxv4f64(<vscale x 4 x double> %v, double %s) {
407 ; CHECK-LABEL: 'vreduce_ord_fadd_nxv4f64'
408 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %v)
409 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
411 ; SIZE-LABEL: 'vreduce_ord_fadd_nxv4f64'
412 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %v)
413 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
415   %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %v)
416   ret double %red
419 define double @vreduce_fwadd_nxv4f64(<vscale x 4 x float> %v, double %s) {
420 ; CHECK-LABEL: 'vreduce_fwadd_nxv4f64'
421 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 4 x float> %v to <vscale x 4 x double>
422 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %e)
423 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
425 ; SIZE-LABEL: 'vreduce_fwadd_nxv4f64'
426 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 4 x float> %v to <vscale x 4 x double>
427 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %e)
428 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
430   %e = fpext <vscale x 4 x float> %v to <vscale x 4 x double>
431   %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %e)
432   ret double %red
435 define double @vreduce_ord_fwadd_nxv4f64(<vscale x 4 x float> %v, double %s) {
436 ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv4f64'
437 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 4 x float> %v to <vscale x 4 x double>
438 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %e)
439 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
441 ; SIZE-LABEL: 'vreduce_ord_fwadd_nxv4f64'
442 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = fpext <vscale x 4 x float> %v to <vscale x 4 x double>
443 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %e)
444 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
446   %e = fpext <vscale x 4 x float> %v to <vscale x 4 x double>
447   %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, <vscale x 4 x double> %e)
448   ret double %red
451 declare half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half>)
453 define half @vreduce_fmin_nxv1f16(<vscale x 1 x half> %v) {
454 ; CHECK-LABEL: 'vreduce_fmin_nxv1f16'
455 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half> %v)
456 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
458 ; SIZE-LABEL: 'vreduce_fmin_nxv1f16'
459 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half> %v)
460 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
462   %red = call half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half> %v)
463   ret half %red
466 define half @vreduce_fmin_nxv1f16_nonans(<vscale x 1 x half> %v) #0 {
467 ; CHECK-LABEL: 'vreduce_fmin_nxv1f16_nonans'
468 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half> %v)
469 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
471 ; SIZE-LABEL: 'vreduce_fmin_nxv1f16_nonans'
472 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half> %v)
473 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
475   %red = call nnan half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half> %v)
476   ret half %red
479 define half @vreduce_fmin_nxv1f16_nonans_noinfs(<vscale x 1 x half> %v) #1 {
480 ; CHECK-LABEL: 'vreduce_fmin_nxv1f16_nonans_noinfs'
481 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half> %v)
482 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
484 ; SIZE-LABEL: 'vreduce_fmin_nxv1f16_nonans_noinfs'
485 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half> %v)
486 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
488   %red = call nnan ninf half @llvm.vector.reduce.fmin.nxv1f16(<vscale x 1 x half> %v)
489   ret half %red
492 declare half @llvm.vector.reduce.fmin.nxv2f16(<vscale x 2 x half>)
494 define half @vreduce_fmin_nxv2f16(<vscale x 2 x half> %v) {
495 ; CHECK-LABEL: 'vreduce_fmin_nxv2f16'
496 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv2f16(<vscale x 2 x half> %v)
497 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
499 ; SIZE-LABEL: 'vreduce_fmin_nxv2f16'
500 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv2f16(<vscale x 2 x half> %v)
501 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
503   %red = call half @llvm.vector.reduce.fmin.nxv2f16(<vscale x 2 x half> %v)
504   ret half %red
507 declare half @llvm.vector.reduce.fmin.nxv4f16(<vscale x 4 x half>)
509 define half @vreduce_fmin_nxv4f16(<vscale x 4 x half> %v) {
510 ; CHECK-LABEL: 'vreduce_fmin_nxv4f16'
511 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv4f16(<vscale x 4 x half> %v)
512 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
514 ; SIZE-LABEL: 'vreduce_fmin_nxv4f16'
515 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv4f16(<vscale x 4 x half> %v)
516 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
518   %red = call half @llvm.vector.reduce.fmin.nxv4f16(<vscale x 4 x half> %v)
519   ret half %red
522 declare half @llvm.vector.reduce.fmin.nxv64f16(<vscale x 64 x half>)
524 define half @vreduce_fmin_nxv64f16(<vscale x 64 x half> %v) {
525 ; CHECK-LABEL: 'vreduce_fmin_nxv64f16'
526 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv64f16(<vscale x 64 x half> %v)
527 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
529 ; SIZE-LABEL: 'vreduce_fmin_nxv64f16'
530 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv64f16(<vscale x 64 x half> %v)
531 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
533   %red = call half @llvm.vector.reduce.fmin.nxv64f16(<vscale x 64 x half> %v)
534   ret half %red
537 declare float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float>)
539 define float @vreduce_fmin_nxv1f32(<vscale x 1 x float> %v) {
540 ; CHECK-LABEL: 'vreduce_fmin_nxv1f32'
541 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float> %v)
542 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
544 ; SIZE-LABEL: 'vreduce_fmin_nxv1f32'
545 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float> %v)
546 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
548   %red = call float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float> %v)
549   ret float %red
552 define float @vreduce_fmin_nxv1f32_nonans(<vscale x 1 x float> %v) {
553 ; CHECK-LABEL: 'vreduce_fmin_nxv1f32_nonans'
554 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float> %v)
555 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
557 ; SIZE-LABEL: 'vreduce_fmin_nxv1f32_nonans'
558 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float> %v)
559 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
561   %red = call nnan float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float> %v)
562   ret float %red
565 define float @vreduce_fmin_nxv1f32_nonans_noinfs(<vscale x 1 x float> %v) {
566 ; CHECK-LABEL: 'vreduce_fmin_nxv1f32_nonans_noinfs'
567 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float> %v)
568 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
570 ; SIZE-LABEL: 'vreduce_fmin_nxv1f32_nonans_noinfs'
571 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float> %v)
572 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
574   %red = call nnan ninf float @llvm.vector.reduce.fmin.nxv1f32(<vscale x 1 x float> %v)
575   ret float %red
578 declare float @llvm.vector.reduce.fmin.nxv2f32(<vscale x 2 x float>)
580 define float @vreduce_fmin_nxv2f32(<vscale x 2 x float> %v) {
581 ; CHECK-LABEL: 'vreduce_fmin_nxv2f32'
582 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv2f32(<vscale x 2 x float> %v)
583 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
585 ; SIZE-LABEL: 'vreduce_fmin_nxv2f32'
586 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv2f32(<vscale x 2 x float> %v)
587 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
589   %red = call float @llvm.vector.reduce.fmin.nxv2f32(<vscale x 2 x float> %v)
590   ret float %red
593 declare float @llvm.vector.reduce.fmin.nxv4f32(<vscale x 4 x float>)
595 define float @vreduce_fmin_nxv4f32(<vscale x 4 x float> %v) {
596 ; CHECK-LABEL: 'vreduce_fmin_nxv4f32'
597 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv4f32(<vscale x 4 x float> %v)
598 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
600 ; SIZE-LABEL: 'vreduce_fmin_nxv4f32'
601 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv4f32(<vscale x 4 x float> %v)
602 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
604   %red = call float @llvm.vector.reduce.fmin.nxv4f32(<vscale x 4 x float> %v)
605   ret float %red
608 declare float @llvm.vector.reduce.fmin.nxv32f32(<vscale x 32 x float>)
610 define float @vreduce_fmin_nxv32f32(<vscale x 32 x float> %v) {
611 ; CHECK-LABEL: 'vreduce_fmin_nxv32f32'
612 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv32f32(<vscale x 32 x float> %v)
613 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
615 ; SIZE-LABEL: 'vreduce_fmin_nxv32f32'
616 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv32f32(<vscale x 32 x float> %v)
617 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
619   %red = call float @llvm.vector.reduce.fmin.nxv32f32(<vscale x 32 x float> %v)
620   ret float %red
623 declare double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double>)
625 define double @vreduce_fmin_nxv1f64(<vscale x 1 x double> %v) {
626 ; CHECK-LABEL: 'vreduce_fmin_nxv1f64'
627 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double> %v)
628 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
630 ; SIZE-LABEL: 'vreduce_fmin_nxv1f64'
631 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double> %v)
632 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
634   %red = call double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double> %v)
635   ret double %red
638 define double @vreduce_fmin_nxv1f64_nonans(<vscale x 1 x double> %v) {
639 ; CHECK-LABEL: 'vreduce_fmin_nxv1f64_nonans'
640 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double> %v)
641 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
643 ; SIZE-LABEL: 'vreduce_fmin_nxv1f64_nonans'
644 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double> %v)
645 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
647   %red = call nnan double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double> %v)
648   ret double %red
651 define double @vreduce_fmin_nxv1f64_nonans_noinfs(<vscale x 1 x double> %v) {
652 ; CHECK-LABEL: 'vreduce_fmin_nxv1f64_nonans_noinfs'
653 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double> %v)
654 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
656 ; SIZE-LABEL: 'vreduce_fmin_nxv1f64_nonans_noinfs'
657 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double> %v)
658 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
660   %red = call nnan ninf double @llvm.vector.reduce.fmin.nxv1f64(<vscale x 1 x double> %v)
661   ret double %red
664 declare double @llvm.vector.reduce.fmin.nxv2f64(<vscale x 2 x double>)
666 define double @vreduce_fmin_nxv2f64(<vscale x 2 x double> %v) {
667 ; CHECK-LABEL: 'vreduce_fmin_nxv2f64'
668 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv2f64(<vscale x 2 x double> %v)
669 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
671 ; SIZE-LABEL: 'vreduce_fmin_nxv2f64'
672 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv2f64(<vscale x 2 x double> %v)
673 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
675   %red = call double @llvm.vector.reduce.fmin.nxv2f64(<vscale x 2 x double> %v)
676   ret double %red
679 declare double @llvm.vector.reduce.fmin.nxv4f64(<vscale x 4 x double>)
681 define double @vreduce_fmin_nxv4f64(<vscale x 4 x double> %v) {
682 ; CHECK-LABEL: 'vreduce_fmin_nxv4f64'
683 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv4f64(<vscale x 4 x double> %v)
684 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
686 ; SIZE-LABEL: 'vreduce_fmin_nxv4f64'
687 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv4f64(<vscale x 4 x double> %v)
688 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
690   %red = call double @llvm.vector.reduce.fmin.nxv4f64(<vscale x 4 x double> %v)
691   ret double %red
694 declare double @llvm.vector.reduce.fmin.nxv16f64(<vscale x 16 x double>)
696 define double @vreduce_fmin_nxv16f64(<vscale x 16 x double> %v) {
697 ; CHECK-LABEL: 'vreduce_fmin_nxv16f64'
698 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv16f64(<vscale x 16 x double> %v)
699 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
701 ; SIZE-LABEL: 'vreduce_fmin_nxv16f64'
702 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv16f64(<vscale x 16 x double> %v)
703 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
705   %red = call double @llvm.vector.reduce.fmin.nxv16f64(<vscale x 16 x double> %v)
706   ret double %red
709 declare half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half>)
711 define half @vreduce_fmax_nxv1f16(<vscale x 1 x half> %v) {
712 ; CHECK-LABEL: 'vreduce_fmax_nxv1f16'
713 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half> %v)
714 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
716 ; SIZE-LABEL: 'vreduce_fmax_nxv1f16'
717 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half> %v)
718 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
720   %red = call half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half> %v)
721   ret half %red
724 define half @vreduce_fmax_nxv1f16_nonans(<vscale x 1 x half> %v) #0 {
725 ; CHECK-LABEL: 'vreduce_fmax_nxv1f16_nonans'
726 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half> %v)
727 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
729 ; SIZE-LABEL: 'vreduce_fmax_nxv1f16_nonans'
730 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half> %v)
731 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
733   %red = call nnan half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half> %v)
734   ret half %red
737 define half @vreduce_fmax_nxv1f16_nonans_noinfs(<vscale x 1 x half> %v) #1 {
738 ; CHECK-LABEL: 'vreduce_fmax_nxv1f16_nonans_noinfs'
739 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half> %v)
740 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
742 ; SIZE-LABEL: 'vreduce_fmax_nxv1f16_nonans_noinfs'
743 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half> %v)
744 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
746   %red = call nnan ninf half @llvm.vector.reduce.fmax.nxv1f16(<vscale x 1 x half> %v)
747   ret half %red
750 declare half @llvm.vector.reduce.fmax.nxv2f16(<vscale x 2 x half>)
752 define half @vreduce_fmax_nxv2f16(<vscale x 2 x half> %v) {
753 ; CHECK-LABEL: 'vreduce_fmax_nxv2f16'
754 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv2f16(<vscale x 2 x half> %v)
755 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
757 ; SIZE-LABEL: 'vreduce_fmax_nxv2f16'
758 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv2f16(<vscale x 2 x half> %v)
759 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
761   %red = call half @llvm.vector.reduce.fmax.nxv2f16(<vscale x 2 x half> %v)
762   ret half %red
765 declare half @llvm.vector.reduce.fmax.nxv4f16(<vscale x 4 x half>)
767 define half @vreduce_fmax_nxv4f16(<vscale x 4 x half> %v) {
768 ; CHECK-LABEL: 'vreduce_fmax_nxv4f16'
769 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv4f16(<vscale x 4 x half> %v)
770 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
772 ; SIZE-LABEL: 'vreduce_fmax_nxv4f16'
773 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv4f16(<vscale x 4 x half> %v)
774 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
776   %red = call half @llvm.vector.reduce.fmax.nxv4f16(<vscale x 4 x half> %v)
777   ret half %red
780 declare half @llvm.vector.reduce.fmax.nxv64f16(<vscale x 64 x half>)
782 define half @vreduce_fmax_nxv64f16(<vscale x 64 x half> %v) {
783 ; CHECK-LABEL: 'vreduce_fmax_nxv64f16'
784 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv64f16(<vscale x 64 x half> %v)
785 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret half %red
787 ; SIZE-LABEL: 'vreduce_fmax_nxv64f16'
788 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv64f16(<vscale x 64 x half> %v)
789 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret half %red
791   %red = call half @llvm.vector.reduce.fmax.nxv64f16(<vscale x 64 x half> %v)
792   ret half %red
795 declare float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float>)
797 define float @vreduce_fmax_nxv1f32(<vscale x 1 x float> %v) {
798 ; CHECK-LABEL: 'vreduce_fmax_nxv1f32'
799 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float> %v)
800 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
802 ; SIZE-LABEL: 'vreduce_fmax_nxv1f32'
803 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float> %v)
804 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
806   %red = call float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float> %v)
807   ret float %red
810 define float @vreduce_fmax_nxv1f32_nonans(<vscale x 1 x float> %v) {
811 ; CHECK-LABEL: 'vreduce_fmax_nxv1f32_nonans'
812 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float> %v)
813 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
815 ; SIZE-LABEL: 'vreduce_fmax_nxv1f32_nonans'
816 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float> %v)
817 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
819   %red = call nnan float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float> %v)
820   ret float %red
823 define float @vreduce_fmax_nxv1f32_nonans_noinfs(<vscale x 1 x float> %v) {
824 ; CHECK-LABEL: 'vreduce_fmax_nxv1f32_nonans_noinfs'
825 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float> %v)
826 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
828 ; SIZE-LABEL: 'vreduce_fmax_nxv1f32_nonans_noinfs'
829 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float> %v)
830 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
832   %red = call nnan ninf float @llvm.vector.reduce.fmax.nxv1f32(<vscale x 1 x float> %v)
833   ret float %red
836 declare float @llvm.vector.reduce.fmax.nxv2f32(<vscale x 2 x float>)
838 define float @vreduce_fmax_nxv2f32(<vscale x 2 x float> %v) {
839 ; CHECK-LABEL: 'vreduce_fmax_nxv2f32'
840 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv2f32(<vscale x 2 x float> %v)
841 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
843 ; SIZE-LABEL: 'vreduce_fmax_nxv2f32'
844 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv2f32(<vscale x 2 x float> %v)
845 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
847   %red = call float @llvm.vector.reduce.fmax.nxv2f32(<vscale x 2 x float> %v)
848   ret float %red
851 declare float @llvm.vector.reduce.fmax.nxv4f32(<vscale x 4 x float>)
853 define float @vreduce_fmax_nxv4f32(<vscale x 4 x float> %v) {
854 ; CHECK-LABEL: 'vreduce_fmax_nxv4f32'
855 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv4f32(<vscale x 4 x float> %v)
856 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
858 ; SIZE-LABEL: 'vreduce_fmax_nxv4f32'
859 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv4f32(<vscale x 4 x float> %v)
860 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
862   %red = call float @llvm.vector.reduce.fmax.nxv4f32(<vscale x 4 x float> %v)
863   ret float %red
866 declare float @llvm.vector.reduce.fmax.nxv32f32(<vscale x 32 x float>)
868 define float @vreduce_fmax_nxv32f32(<vscale x 32 x float> %v) {
869 ; CHECK-LABEL: 'vreduce_fmax_nxv32f32'
870 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv32f32(<vscale x 32 x float> %v)
871 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
873 ; SIZE-LABEL: 'vreduce_fmax_nxv32f32'
874 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv32f32(<vscale x 32 x float> %v)
875 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
877   %red = call float @llvm.vector.reduce.fmax.nxv32f32(<vscale x 32 x float> %v)
878   ret float %red
881 declare double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double>)
883 define double @vreduce_fmax_nxv1f64(<vscale x 1 x double> %v) {
884 ; CHECK-LABEL: 'vreduce_fmax_nxv1f64'
885 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double> %v)
886 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
888 ; SIZE-LABEL: 'vreduce_fmax_nxv1f64'
889 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double> %v)
890 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
892   %red = call double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double> %v)
893   ret double %red
896 define double @vreduce_fmax_nxv1f64_nonans(<vscale x 1 x double> %v) {
897 ; CHECK-LABEL: 'vreduce_fmax_nxv1f64_nonans'
898 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double> %v)
899 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
901 ; SIZE-LABEL: 'vreduce_fmax_nxv1f64_nonans'
902 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double> %v)
903 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
905   %red = call nnan double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double> %v)
906   ret double %red
909 define double @vreduce_fmax_nxv1f64_nonans_noinfs(<vscale x 1 x double> %v) {
910 ; CHECK-LABEL: 'vreduce_fmax_nxv1f64_nonans_noinfs'
911 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double> %v)
912 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
914 ; SIZE-LABEL: 'vreduce_fmax_nxv1f64_nonans_noinfs'
915 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double> %v)
916 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
918   %red = call nnan ninf double @llvm.vector.reduce.fmax.nxv1f64(<vscale x 1 x double> %v)
919   ret double %red
922 declare double @llvm.vector.reduce.fmax.nxv2f64(<vscale x 2 x double>)
924 define double @vreduce_fmax_nxv2f64(<vscale x 2 x double> %v) {
925 ; CHECK-LABEL: 'vreduce_fmax_nxv2f64'
926 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv2f64(<vscale x 2 x double> %v)
927 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
929 ; SIZE-LABEL: 'vreduce_fmax_nxv2f64'
930 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv2f64(<vscale x 2 x double> %v)
931 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
933   %red = call double @llvm.vector.reduce.fmax.nxv2f64(<vscale x 2 x double> %v)
934   ret double %red
937 declare double @llvm.vector.reduce.fmax.nxv4f64(<vscale x 4 x double>)
939 define double @vreduce_fmax_nxv4f64(<vscale x 4 x double> %v) {
940 ; CHECK-LABEL: 'vreduce_fmax_nxv4f64'
941 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv4f64(<vscale x 4 x double> %v)
942 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
944 ; SIZE-LABEL: 'vreduce_fmax_nxv4f64'
945 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv4f64(<vscale x 4 x double> %v)
946 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
948   %red = call double @llvm.vector.reduce.fmax.nxv4f64(<vscale x 4 x double> %v)
949   ret double %red
952 declare double @llvm.vector.reduce.fmax.nxv16f64(<vscale x 16 x double>)
954 define double @vreduce_fmax_nxv16f64(<vscale x 16 x double> %v) {
955 ; CHECK-LABEL: 'vreduce_fmax_nxv16f64'
956 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv16f64(<vscale x 16 x double> %v)
957 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %red
959 ; SIZE-LABEL: 'vreduce_fmax_nxv16f64'
960 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv16f64(<vscale x 16 x double> %v)
961 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret double %red
963   %red = call double @llvm.vector.reduce.fmax.nxv16f64(<vscale x 16 x double> %v)
964   ret double %red
967 define float @vreduce_nsz_fadd_nxv1f32(<vscale x 1 x float> %v, float %s) {
968 ; CHECK-LABEL: 'vreduce_nsz_fadd_nxv1f32'
969 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %red = call reassoc nsz float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %v)
970 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %red
972 ; SIZE-LABEL: 'vreduce_nsz_fadd_nxv1f32'
973 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %red = call reassoc nsz float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %v)
974 ; SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret float %red
976   %red = call reassoc nsz float @llvm.vector.reduce.fadd.nxv1f32(float %s, <vscale x 1 x float> %v)
977   ret float %red