1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -cost-model -cost-kind=throughput -analyze | FileCheck %s --check-prefixes=CHECK,CHECK-NOF16
3 ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -mattr=+fullfp16 -cost-model -cost-kind=throughput -analyze | FileCheck %s --check-prefixes=CHECK,CHECK-F16
5 define void @reduce_umin() {
6 ; CHECK-LABEL: 'reduce_umin'
7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1i8 = call i8 @llvm.vector.reduce.umin.v1i8(<1 x i8> undef)
8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V3i8 = call i8 @llvm.vector.reduce.umin.v3i8(<3 x i8> undef)
9 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i8 = call i8 @llvm.vector.reduce.umin.v4i8(<4 x i8> undef)
10 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i8 = call i8 @llvm.vector.reduce.umin.v8i8(<8 x i8> undef)
11 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i8 = call i8 @llvm.vector.reduce.umin.v16i8(<16 x i8> undef)
12 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32i8 = call i8 @llvm.vector.reduce.umin.v32i8(<32 x i8> undef)
13 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V64i8 = call i8 @llvm.vector.reduce.umin.v64i8(<64 x i8> undef)
14 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i16 = call i16 @llvm.vector.reduce.umin.v2i16(<2 x i16> undef)
15 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i16 = call i16 @llvm.vector.reduce.umin.v4i16(<4 x i16> undef)
16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i16 = call i16 @llvm.vector.reduce.umin.v8i16(<8 x i16> undef)
17 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16i16 = call i16 @llvm.vector.reduce.umin.v16i16(<16 x i16> undef)
18 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i32 = call i32 @llvm.vector.reduce.umin.v2i32(<2 x i32> undef)
19 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i32 = call i32 @llvm.vector.reduce.umin.v4i32(<4 x i32> undef)
20 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8i32 = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> undef)
21 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i64 = call i64 @llvm.vector.reduce.umin.v2i64(<2 x i64> undef)
22 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = call i64 @llvm.vector.reduce.umin.v4i64(<4 x i64> undef)
23 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
25 %V1i8 = call i8 @llvm.vector.reduce.umin.v1i8(<1 x i8> undef)
26 %V3i8 = call i8 @llvm.vector.reduce.umin.v3i8(<3 x i8> undef)
27 %V4i8 = call i8 @llvm.vector.reduce.umin.v4i8(<4 x i8> undef)
28 %V8i8 = call i8 @llvm.vector.reduce.umin.v8i8(<8 x i8> undef)
29 %V16i8 = call i8 @llvm.vector.reduce.umin.v16i8(<16 x i8> undef)
30 %V32i8 = call i8 @llvm.vector.reduce.umin.v32i8(<32 x i8> undef)
31 %V64i8 = call i8 @llvm.vector.reduce.umin.v64i8(<64 x i8> undef)
32 %V2i16 = call i16 @llvm.vector.reduce.umin.v2i16(<2 x i16> undef)
33 %V4i16 = call i16 @llvm.vector.reduce.umin.v4i16(<4 x i16> undef)
34 %V8i16 = call i16 @llvm.vector.reduce.umin.v8i16(<8 x i16> undef)
35 %V16i16 = call i16 @llvm.vector.reduce.umin.v16i16(<16 x i16> undef)
36 %V2i32 = call i32 @llvm.vector.reduce.umin.v2i32(<2 x i32> undef)
37 %V4i32 = call i32 @llvm.vector.reduce.umin.v4i32(<4 x i32> undef)
38 %V8i32 = call i32 @llvm.vector.reduce.umin.v8i32(<8 x i32> undef)
39 %V2i64 = call i64 @llvm.vector.reduce.umin.v2i64(<2 x i64> undef)
40 %V4i64 = call i64 @llvm.vector.reduce.umin.v4i64(<4 x i64> undef)
44 define void @reduce_umax() {
45 ; CHECK-LABEL: 'reduce_umax'
46 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1i8 = call i8 @llvm.vector.reduce.umax.v1i8(<1 x i8> undef)
47 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V3i8 = call i8 @llvm.vector.reduce.umax.v3i8(<3 x i8> undef)
48 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i8 = call i8 @llvm.vector.reduce.umax.v4i8(<4 x i8> undef)
49 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i8 = call i8 @llvm.vector.reduce.umax.v8i8(<8 x i8> undef)
50 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i8 = call i8 @llvm.vector.reduce.umax.v16i8(<16 x i8> undef)
51 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32i8 = call i8 @llvm.vector.reduce.umax.v32i8(<32 x i8> undef)
52 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V64i8 = call i8 @llvm.vector.reduce.umax.v64i8(<64 x i8> undef)
53 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i16 = call i16 @llvm.vector.reduce.umax.v2i16(<2 x i16> undef)
54 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i16 = call i16 @llvm.vector.reduce.umax.v4i16(<4 x i16> undef)
55 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i16 = call i16 @llvm.vector.reduce.umax.v8i16(<8 x i16> undef)
56 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16i16 = call i16 @llvm.vector.reduce.umax.v16i16(<16 x i16> undef)
57 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i32 = call i32 @llvm.vector.reduce.umax.v2i32(<2 x i32> undef)
58 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i32 = call i32 @llvm.vector.reduce.umax.v4i32(<4 x i32> undef)
59 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8i32 = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> undef)
60 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i64 = call i64 @llvm.vector.reduce.umax.v2i64(<2 x i64> undef)
61 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = call i64 @llvm.vector.reduce.umax.v4i64(<4 x i64> undef)
62 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
64 %V1i8 = call i8 @llvm.vector.reduce.umax.v1i8(<1 x i8> undef)
65 %V3i8 = call i8 @llvm.vector.reduce.umax.v3i8(<3 x i8> undef)
66 %V4i8 = call i8 @llvm.vector.reduce.umax.v4i8(<4 x i8> undef)
67 %V8i8 = call i8 @llvm.vector.reduce.umax.v8i8(<8 x i8> undef)
68 %V16i8 = call i8 @llvm.vector.reduce.umax.v16i8(<16 x i8> undef)
69 %V32i8 = call i8 @llvm.vector.reduce.umax.v32i8(<32 x i8> undef)
70 %V64i8 = call i8 @llvm.vector.reduce.umax.v64i8(<64 x i8> undef)
71 %V2i16 = call i16 @llvm.vector.reduce.umax.v2i16(<2 x i16> undef)
72 %V4i16 = call i16 @llvm.vector.reduce.umax.v4i16(<4 x i16> undef)
73 %V8i16 = call i16 @llvm.vector.reduce.umax.v8i16(<8 x i16> undef)
74 %V16i16 = call i16 @llvm.vector.reduce.umax.v16i16(<16 x i16> undef)
75 %V2i32 = call i32 @llvm.vector.reduce.umax.v2i32(<2 x i32> undef)
76 %V4i32 = call i32 @llvm.vector.reduce.umax.v4i32(<4 x i32> undef)
77 %V8i32 = call i32 @llvm.vector.reduce.umax.v8i32(<8 x i32> undef)
78 %V2i64 = call i64 @llvm.vector.reduce.umax.v2i64(<2 x i64> undef)
79 %V4i64 = call i64 @llvm.vector.reduce.umax.v4i64(<4 x i64> undef)
83 define void @reduce_smin() {
84 ; CHECK-LABEL: 'reduce_smin'
85 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1i8 = call i8 @llvm.vector.reduce.smin.v1i8(<1 x i8> undef)
86 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V3i8 = call i8 @llvm.vector.reduce.smin.v3i8(<3 x i8> undef)
87 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i8 = call i8 @llvm.vector.reduce.smin.v4i8(<4 x i8> undef)
88 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i8 = call i8 @llvm.vector.reduce.smin.v8i8(<8 x i8> undef)
89 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i8 = call i8 @llvm.vector.reduce.smin.v16i8(<16 x i8> undef)
90 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32i8 = call i8 @llvm.vector.reduce.smin.v32i8(<32 x i8> undef)
91 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V64i8 = call i8 @llvm.vector.reduce.smin.v64i8(<64 x i8> undef)
92 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i16 = call i16 @llvm.vector.reduce.smin.v2i16(<2 x i16> undef)
93 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i16 = call i16 @llvm.vector.reduce.smin.v4i16(<4 x i16> undef)
94 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i16 = call i16 @llvm.vector.reduce.smin.v8i16(<8 x i16> undef)
95 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16i16 = call i16 @llvm.vector.reduce.smin.v16i16(<16 x i16> undef)
96 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i32 = call i32 @llvm.vector.reduce.smin.v2i32(<2 x i32> undef)
97 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i32 = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> undef)
98 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8i32 = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> undef)
99 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i64 = call i64 @llvm.vector.reduce.smin.v2i64(<2 x i64> undef)
100 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = call i64 @llvm.vector.reduce.smin.v4i64(<4 x i64> undef)
101 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
103 %V1i8 = call i8 @llvm.vector.reduce.smin.v1i8(<1 x i8> undef)
104 %V3i8 = call i8 @llvm.vector.reduce.smin.v3i8(<3 x i8> undef)
105 %V4i8 = call i8 @llvm.vector.reduce.smin.v4i8(<4 x i8> undef)
106 %V8i8 = call i8 @llvm.vector.reduce.smin.v8i8(<8 x i8> undef)
107 %V16i8 = call i8 @llvm.vector.reduce.smin.v16i8(<16 x i8> undef)
108 %V32i8 = call i8 @llvm.vector.reduce.smin.v32i8(<32 x i8> undef)
109 %V64i8 = call i8 @llvm.vector.reduce.smin.v64i8(<64 x i8> undef)
110 %V2i16 = call i16 @llvm.vector.reduce.smin.v2i16(<2 x i16> undef)
111 %V4i16 = call i16 @llvm.vector.reduce.smin.v4i16(<4 x i16> undef)
112 %V8i16 = call i16 @llvm.vector.reduce.smin.v8i16(<8 x i16> undef)
113 %V16i16 = call i16 @llvm.vector.reduce.smin.v16i16(<16 x i16> undef)
114 %V2i32 = call i32 @llvm.vector.reduce.smin.v2i32(<2 x i32> undef)
115 %V4i32 = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> undef)
116 %V8i32 = call i32 @llvm.vector.reduce.smin.v8i32(<8 x i32> undef)
117 %V2i64 = call i64 @llvm.vector.reduce.smin.v2i64(<2 x i64> undef)
118 %V4i64 = call i64 @llvm.vector.reduce.smin.v4i64(<4 x i64> undef)
122 define void @reduce_smax() {
123 ; CHECK-LABEL: 'reduce_smax'
124 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1i8 = call i8 @llvm.vector.reduce.smax.v1i8(<1 x i8> undef)
125 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V3i8 = call i8 @llvm.vector.reduce.smax.v3i8(<3 x i8> undef)
126 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i8 = call i8 @llvm.vector.reduce.smax.v4i8(<4 x i8> undef)
127 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i8 = call i8 @llvm.vector.reduce.smax.v8i8(<8 x i8> undef)
128 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i8 = call i8 @llvm.vector.reduce.smax.v16i8(<16 x i8> undef)
129 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32i8 = call i8 @llvm.vector.reduce.smax.v32i8(<32 x i8> undef)
130 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V64i8 = call i8 @llvm.vector.reduce.smax.v64i8(<64 x i8> undef)
131 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i16 = call i16 @llvm.vector.reduce.smax.v2i16(<2 x i16> undef)
132 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i16 = call i16 @llvm.vector.reduce.smax.v4i16(<4 x i16> undef)
133 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i16 = call i16 @llvm.vector.reduce.smax.v8i16(<8 x i16> undef)
134 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16i16 = call i16 @llvm.vector.reduce.smax.v16i16(<16 x i16> undef)
135 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i32 = call i32 @llvm.vector.reduce.smax.v2i32(<2 x i32> undef)
136 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i32 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> undef)
137 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8i32 = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> undef)
138 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i64 = call i64 @llvm.vector.reduce.smax.v2i64(<2 x i64> undef)
139 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = call i64 @llvm.vector.reduce.smax.v4i64(<4 x i64> undef)
140 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
142 %V1i8 = call i8 @llvm.vector.reduce.smax.v1i8(<1 x i8> undef)
143 %V3i8 = call i8 @llvm.vector.reduce.smax.v3i8(<3 x i8> undef)
144 %V4i8 = call i8 @llvm.vector.reduce.smax.v4i8(<4 x i8> undef)
145 %V8i8 = call i8 @llvm.vector.reduce.smax.v8i8(<8 x i8> undef)
146 %V16i8 = call i8 @llvm.vector.reduce.smax.v16i8(<16 x i8> undef)
147 %V32i8 = call i8 @llvm.vector.reduce.smax.v32i8(<32 x i8> undef)
148 %V64i8 = call i8 @llvm.vector.reduce.smax.v64i8(<64 x i8> undef)
149 %V2i16 = call i16 @llvm.vector.reduce.smax.v2i16(<2 x i16> undef)
150 %V4i16 = call i16 @llvm.vector.reduce.smax.v4i16(<4 x i16> undef)
151 %V8i16 = call i16 @llvm.vector.reduce.smax.v8i16(<8 x i16> undef)
152 %V16i16 = call i16 @llvm.vector.reduce.smax.v16i16(<16 x i16> undef)
153 %V2i32 = call i32 @llvm.vector.reduce.smax.v2i32(<2 x i32> undef)
154 %V4i32 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> undef)
155 %V8i32 = call i32 @llvm.vector.reduce.smax.v8i32(<8 x i32> undef)
156 %V2i64 = call i64 @llvm.vector.reduce.smax.v2i64(<2 x i64> undef)
157 %V4i64 = call i64 @llvm.vector.reduce.smax.v4i64(<4 x i64> undef)
161 define void @reduce_fmin16() {
162 ; CHECK-NOF16-LABEL: 'reduce_fmin16'
163 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2f16 = call half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
164 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %V4f16 = call half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
165 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 198 for instruction: %V8f16 = call half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
166 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 298 for instruction: %V16f16 = call half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
167 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
169 ; CHECK-F16-LABEL: 'reduce_fmin16'
170 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2f16 = call half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
171 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4f16 = call half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
172 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8f16 = call half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
173 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16f16 = call half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
174 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
176 %V2f16 = call half @llvm.vector.reduce.fmin.v2f16(<2 x half> undef)
177 %V4f16 = call half @llvm.vector.reduce.fmin.v4f16(<4 x half> undef)
178 %V8f16 = call half @llvm.vector.reduce.fmin.v8f16(<8 x half> undef)
179 %V16f16 = call half @llvm.vector.reduce.fmin.v16f16(<16 x half> undef)
183 define void @reduce_fmax16() {
184 ; CHECK-NOF16-LABEL: 'reduce_fmax16'
185 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2f16 = call half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
186 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %V4f16 = call half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
187 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 198 for instruction: %V8f16 = call half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
188 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 298 for instruction: %V16f16 = call half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
189 ; CHECK-NOF16-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
191 ; CHECK-F16-LABEL: 'reduce_fmax16'
192 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2f16 = call half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
193 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4f16 = call half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
194 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8f16 = call half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
195 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16f16 = call half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
196 ; CHECK-F16-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
198 %V2f16 = call half @llvm.vector.reduce.fmax.v2f16(<2 x half> undef)
199 %V4f16 = call half @llvm.vector.reduce.fmax.v4f16(<4 x half> undef)
200 %V8f16 = call half @llvm.vector.reduce.fmax.v8f16(<8 x half> undef)
201 %V16f16 = call half @llvm.vector.reduce.fmax.v16f16(<16 x half> undef)
205 define void @reduce_fmin() {
206 ; CHECK-LABEL: 'reduce_fmin'
207 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2f32 = call float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
208 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4f32 = call float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
209 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8f32 = call float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
210 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2f64 = call double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
211 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4f64 = call double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
212 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
214 %V2f32 = call float @llvm.vector.reduce.fmin.v2f32(<2 x float> undef)
215 %V4f32 = call float @llvm.vector.reduce.fmin.v4f32(<4 x float> undef)
216 %V8f32 = call float @llvm.vector.reduce.fmin.v8f32(<8 x float> undef)
217 %V2f64 = call double @llvm.vector.reduce.fmin.v2f64(<2 x double> undef)
218 %V4f64 = call double @llvm.vector.reduce.fmin.v4f64(<4 x double> undef)
222 define void @reduce_fmax() {
223 ; CHECK-LABEL: 'reduce_fmax'
224 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2f32 = call float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
225 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4f32 = call float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
226 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8f32 = call float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
227 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2f64 = call double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
228 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4f64 = call double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
229 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
231 %V2f32 = call float @llvm.vector.reduce.fmax.v2f32(<2 x float> undef)
232 %V4f32 = call float @llvm.vector.reduce.fmax.v4f32(<4 x float> undef)
233 %V8f32 = call float @llvm.vector.reduce.fmax.v8f32(<8 x float> undef)
234 %V2f64 = call double @llvm.vector.reduce.fmax.v2f64(<2 x double> undef)
235 %V4f64 = call double @llvm.vector.reduce.fmax.v4f64(<4 x double> undef)
239 declare i8 @llvm.vector.reduce.umin.v1i8(<1 x i8>)
240 declare i8 @llvm.vector.reduce.umin.v3i8(<3 x i8>)
241 declare i8 @llvm.vector.reduce.umin.v4i8(<4 x i8>)
242 declare i8 @llvm.vector.reduce.umin.v8i8(<8 x i8>)
243 declare i8 @llvm.vector.reduce.umin.v16i8(<16 x i8>)
244 declare i8 @llvm.vector.reduce.umin.v32i8(<32 x i8>)
245 declare i8 @llvm.vector.reduce.umin.v64i8(<64 x i8>)
246 declare i16 @llvm.vector.reduce.umin.v2i16(<2 x i16>)
247 declare i16 @llvm.vector.reduce.umin.v4i16(<4 x i16>)
248 declare i16 @llvm.vector.reduce.umin.v8i16(<8 x i16>)
249 declare i16 @llvm.vector.reduce.umin.v16i16(<16 x i16>)
250 declare i32 @llvm.vector.reduce.umin.v2i32(<2 x i32>)
251 declare i32 @llvm.vector.reduce.umin.v4i32(<4 x i32>)
252 declare i32 @llvm.vector.reduce.umin.v8i32(<8 x i32>)
253 declare i64 @llvm.vector.reduce.umin.v2i64(<2 x i64>)
254 declare i64 @llvm.vector.reduce.umin.v4i64(<4 x i64>)
256 declare i8 @llvm.vector.reduce.umax.v1i8(<1 x i8>)
257 declare i8 @llvm.vector.reduce.umax.v3i8(<3 x i8>)
258 declare i8 @llvm.vector.reduce.umax.v4i8(<4 x i8>)
259 declare i8 @llvm.vector.reduce.umax.v8i8(<8 x i8>)
260 declare i8 @llvm.vector.reduce.umax.v16i8(<16 x i8>)
261 declare i8 @llvm.vector.reduce.umax.v32i8(<32 x i8>)
262 declare i8 @llvm.vector.reduce.umax.v64i8(<64 x i8>)
263 declare i16 @llvm.vector.reduce.umax.v2i16(<2 x i16>)
264 declare i16 @llvm.vector.reduce.umax.v4i16(<4 x i16>)
265 declare i16 @llvm.vector.reduce.umax.v8i16(<8 x i16>)
266 declare i16 @llvm.vector.reduce.umax.v16i16(<16 x i16>)
267 declare i32 @llvm.vector.reduce.umax.v2i32(<2 x i32>)
268 declare i32 @llvm.vector.reduce.umax.v4i32(<4 x i32>)
269 declare i32 @llvm.vector.reduce.umax.v8i32(<8 x i32>)
270 declare i64 @llvm.vector.reduce.umax.v2i64(<2 x i64>)
271 declare i64 @llvm.vector.reduce.umax.v4i64(<4 x i64>)
273 declare i8 @llvm.vector.reduce.smin.v1i8(<1 x i8>)
274 declare i8 @llvm.vector.reduce.smin.v3i8(<3 x i8>)
275 declare i8 @llvm.vector.reduce.smin.v4i8(<4 x i8>)
276 declare i8 @llvm.vector.reduce.smin.v8i8(<8 x i8>)
277 declare i8 @llvm.vector.reduce.smin.v16i8(<16 x i8>)
278 declare i8 @llvm.vector.reduce.smin.v32i8(<32 x i8>)
279 declare i8 @llvm.vector.reduce.smin.v64i8(<64 x i8>)
280 declare i16 @llvm.vector.reduce.smin.v2i16(<2 x i16>)
281 declare i16 @llvm.vector.reduce.smin.v4i16(<4 x i16>)
282 declare i16 @llvm.vector.reduce.smin.v8i16(<8 x i16>)
283 declare i16 @llvm.vector.reduce.smin.v16i16(<16 x i16>)
284 declare i32 @llvm.vector.reduce.smin.v2i32(<2 x i32>)
285 declare i32 @llvm.vector.reduce.smin.v4i32(<4 x i32>)
286 declare i32 @llvm.vector.reduce.smin.v8i32(<8 x i32>)
287 declare i64 @llvm.vector.reduce.smin.v2i64(<2 x i64>)
288 declare i64 @llvm.vector.reduce.smin.v4i64(<4 x i64>)
290 declare i8 @llvm.vector.reduce.smax.v1i8(<1 x i8>)
291 declare i8 @llvm.vector.reduce.smax.v3i8(<3 x i8>)
292 declare i8 @llvm.vector.reduce.smax.v4i8(<4 x i8>)
293 declare i8 @llvm.vector.reduce.smax.v8i8(<8 x i8>)
294 declare i8 @llvm.vector.reduce.smax.v16i8(<16 x i8>)
295 declare i8 @llvm.vector.reduce.smax.v32i8(<32 x i8>)
296 declare i8 @llvm.vector.reduce.smax.v64i8(<64 x i8>)
297 declare i16 @llvm.vector.reduce.smax.v2i16(<2 x i16>)
298 declare i16 @llvm.vector.reduce.smax.v4i16(<4 x i16>)
299 declare i16 @llvm.vector.reduce.smax.v8i16(<8 x i16>)
300 declare i16 @llvm.vector.reduce.smax.v16i16(<16 x i16>)
301 declare i32 @llvm.vector.reduce.smax.v2i32(<2 x i32>)
302 declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>)
303 declare i32 @llvm.vector.reduce.smax.v8i32(<8 x i32>)
304 declare i64 @llvm.vector.reduce.smax.v2i64(<2 x i64>)
305 declare i64 @llvm.vector.reduce.smax.v4i64(<4 x i64>)
307 declare half @llvm.vector.reduce.fmin.v2f16(<2 x half>)
308 declare half @llvm.vector.reduce.fmin.v4f16(<4 x half>)
309 declare half @llvm.vector.reduce.fmin.v8f16(<8 x half>)
310 declare half @llvm.vector.reduce.fmin.v16f16(<16 x half>)
311 declare float @llvm.vector.reduce.fmin.v2f32(<2 x float>)
312 declare float @llvm.vector.reduce.fmin.v4f32(<4 x float>)
313 declare float @llvm.vector.reduce.fmin.v8f32(<8 x float>)
314 declare double @llvm.vector.reduce.fmin.v2f64(<2 x double>)
315 declare double @llvm.vector.reduce.fmin.v4f64(<4 x double>)
317 declare half @llvm.vector.reduce.fmax.v2f16(<2 x half>)
318 declare half @llvm.vector.reduce.fmax.v4f16(<4 x half>)
319 declare half @llvm.vector.reduce.fmax.v8f16(<8 x half>)
320 declare half @llvm.vector.reduce.fmax.v16f16(<16 x half>)
321 declare float @llvm.vector.reduce.fmax.v2f32(<2 x float>)
322 declare float @llvm.vector.reduce.fmax.v4f32(<4 x float>)
323 declare float @llvm.vector.reduce.fmax.v8f32(<8 x float>)
324 declare double @llvm.vector.reduce.fmax.v2f64(<2 x double>)
325 declare double @llvm.vector.reduce.fmax.v4f64(<4 x double>)