1 ; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
2 ; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=zEC12 \
3 ; RUN: | FileCheck %s --check-prefix=IPMSQ
5 ; TODO: add more tests for differing operand types of the two compares.
7 define i8 @fun0(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
9 %cmp0 = icmp eq i8 %val1, %val2
10 %cmp1 = icmp eq i8 %val3, %val4
11 %and = and i1 %cmp0, %cmp1
12 %sel = select i1 %and, i8 %val5, i8 %val6
16 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
17 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
18 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
19 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
22 define i16 @fun1(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
23 i16 %val5, i16 %val6) {
24 %cmp0 = icmp eq i8 %val1, %val2
25 %cmp1 = icmp eq i8 %val3, %val4
26 %and = and i1 %cmp0, %cmp1
27 %sel = select i1 %and, i16 %val5, i16 %val6
31 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
32 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
33 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
34 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
37 define i32 @fun2(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
38 i32 %val5, i32 %val6) {
39 %cmp0 = icmp eq i8 %val1, %val2
40 %cmp1 = icmp eq i8 %val3, %val4
41 %and = and i1 %cmp0, %cmp1
42 %sel = select i1 %and, i32 %val5, i32 %val6
46 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
47 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
48 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
49 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
52 define i64 @fun3(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
53 i64 %val5, i64 %val6) {
54 %cmp0 = icmp eq i8 %val1, %val2
55 %cmp1 = icmp eq i8 %val3, %val4
56 %and = and i1 %cmp0, %cmp1
57 %sel = select i1 %and, i64 %val5, i64 %val6
61 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
62 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
63 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
64 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
67 define float @fun4(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
68 float %val5, float %val6) {
69 %cmp0 = icmp eq i8 %val1, %val2
70 %cmp1 = icmp eq i8 %val3, %val4
71 %and = and i1 %cmp0, %cmp1
72 %sel = select i1 %and, float %val5, float %val6
76 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
77 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
78 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
79 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
82 define double @fun5(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
83 double %val5, double %val6) {
84 %cmp0 = icmp eq i8 %val1, %val2
85 %cmp1 = icmp eq i8 %val3, %val4
86 %and = and i1 %cmp0, %cmp1
87 %sel = select i1 %and, double %val5, double %val6
91 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
92 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
93 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
94 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
97 define i8 @fun6(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
99 %cmp0 = icmp eq i16 %val1, %val2
100 %cmp1 = icmp eq i16 %val3, %val4
101 %and = and i1 %cmp0, %cmp1
102 %sel = select i1 %and, i8 %val5, i8 %val6
106 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
107 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
108 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
109 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
112 define i16 @fun7(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
113 i16 %val5, i16 %val6) {
114 %cmp0 = icmp eq i16 %val1, %val2
115 %cmp1 = icmp eq i16 %val3, %val4
116 %and = and i1 %cmp0, %cmp1
117 %sel = select i1 %and, i16 %val5, i16 %val6
121 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
122 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
123 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
124 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
127 define i32 @fun8(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
128 i32 %val5, i32 %val6) {
129 %cmp0 = icmp eq i16 %val1, %val2
130 %cmp1 = icmp eq i16 %val3, %val4
131 %and = and i1 %cmp0, %cmp1
132 %sel = select i1 %and, i32 %val5, i32 %val6
136 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
137 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
138 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
139 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
142 define i64 @fun9(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
143 i64 %val5, i64 %val6) {
144 %cmp0 = icmp eq i16 %val1, %val2
145 %cmp1 = icmp eq i16 %val3, %val4
146 %and = and i1 %cmp0, %cmp1
147 %sel = select i1 %and, i64 %val5, i64 %val6
151 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
152 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
153 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
154 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
157 define float @fun10(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
158 float %val5, float %val6) {
159 %cmp0 = icmp eq i16 %val1, %val2
160 %cmp1 = icmp eq i16 %val3, %val4
161 %and = and i1 %cmp0, %cmp1
162 %sel = select i1 %and, float %val5, float %val6
166 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
167 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
168 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
169 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
172 define double @fun11(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
173 double %val5, double %val6) {
174 %cmp0 = icmp eq i16 %val1, %val2
175 %cmp1 = icmp eq i16 %val3, %val4
176 %and = and i1 %cmp0, %cmp1
177 %sel = select i1 %and, double %val5, double %val6
181 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
182 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
183 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
184 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
187 define i8 @fun12(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
188 i8 %val5, i8 %val6) {
189 %cmp0 = icmp eq i32 %val1, %val2
190 %cmp1 = icmp eq i32 %val3, %val4
191 %and = and i1 %cmp0, %cmp1
192 %sel = select i1 %and, i8 %val5, i8 %val6
196 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
197 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
198 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
199 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
202 define i16 @fun13(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
203 i16 %val5, i16 %val6) {
204 %cmp0 = icmp eq i32 %val1, %val2
205 %cmp1 = icmp eq i32 %val3, %val4
206 %and = and i1 %cmp0, %cmp1
207 %sel = select i1 %and, i16 %val5, i16 %val6
211 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
212 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
213 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
214 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
217 define i32 @fun14(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
218 i32 %val5, i32 %val6) {
219 %cmp0 = icmp eq i32 %val1, %val2
220 %cmp1 = icmp eq i32 %val3, %val4
221 %and = and i1 %cmp0, %cmp1
222 %sel = select i1 %and, i32 %val5, i32 %val6
226 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
227 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
228 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
229 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
232 define i64 @fun15(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
233 i64 %val5, i64 %val6) {
234 %cmp0 = icmp eq i32 %val1, %val2
235 %cmp1 = icmp eq i32 %val3, %val4
236 %and = and i1 %cmp0, %cmp1
237 %sel = select i1 %and, i64 %val5, i64 %val6
241 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
242 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
243 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
244 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
247 define float @fun16(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
248 float %val5, float %val6) {
249 %cmp0 = icmp eq i32 %val1, %val2
250 %cmp1 = icmp eq i32 %val3, %val4
251 %and = and i1 %cmp0, %cmp1
252 %sel = select i1 %and, float %val5, float %val6
256 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
257 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
258 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
259 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
262 define double @fun17(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
263 double %val5, double %val6) {
264 %cmp0 = icmp eq i32 %val1, %val2
265 %cmp1 = icmp eq i32 %val3, %val4
266 %and = and i1 %cmp0, %cmp1
267 %sel = select i1 %and, double %val5, double %val6
271 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
272 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
273 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
274 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
277 define i8 @fun18(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
278 i8 %val5, i8 %val6) {
279 %cmp0 = icmp eq i64 %val1, %val2
280 %cmp1 = icmp eq i64 %val3, %val4
281 %and = and i1 %cmp0, %cmp1
282 %sel = select i1 %and, i8 %val5, i8 %val6
286 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
287 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
288 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
289 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
292 define i16 @fun19(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
293 i16 %val5, i16 %val6) {
294 %cmp0 = icmp eq i64 %val1, %val2
295 %cmp1 = icmp eq i64 %val3, %val4
296 %and = and i1 %cmp0, %cmp1
297 %sel = select i1 %and, i16 %val5, i16 %val6
301 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
302 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
303 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
304 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
307 define i32 @fun20(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
308 i32 %val5, i32 %val6) {
309 %cmp0 = icmp eq i64 %val1, %val2
310 %cmp1 = icmp eq i64 %val3, %val4
311 %and = and i1 %cmp0, %cmp1
312 %sel = select i1 %and, i32 %val5, i32 %val6
316 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
317 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
318 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
319 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
322 define i64 @fun21(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
323 i64 %val5, i64 %val6) {
324 %cmp0 = icmp eq i64 %val1, %val2
325 %cmp1 = icmp eq i64 %val3, %val4
326 %and = and i1 %cmp0, %cmp1
327 %sel = select i1 %and, i64 %val5, i64 %val6
331 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
332 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
333 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
334 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
337 define float @fun22(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
338 float %val5, float %val6) {
339 %cmp0 = icmp eq i64 %val1, %val2
340 %cmp1 = icmp eq i64 %val3, %val4
341 %and = and i1 %cmp0, %cmp1
342 %sel = select i1 %and, float %val5, float %val6
346 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
347 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
348 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
349 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
352 define double @fun23(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
353 double %val5, double %val6) {
354 %cmp0 = icmp eq i64 %val1, %val2
355 %cmp1 = icmp eq i64 %val3, %val4
356 %and = and i1 %cmp0, %cmp1
357 %sel = select i1 %and, double %val5, double %val6
361 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
362 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
363 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
364 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
367 define i8 @fun24(float %val1, float %val2, float %val3, float %val4,
368 i8 %val5, i8 %val6) {
369 %cmp0 = fcmp ogt float %val1, %val2
370 %cmp1 = fcmp ogt float %val3, %val4
371 %and = and i1 %cmp0, %cmp1
372 %sel = select i1 %and, i8 %val5, i8 %val6
376 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
377 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
378 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
379 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
382 define i16 @fun25(float %val1, float %val2, float %val3, float %val4,
383 i16 %val5, i16 %val6) {
384 %cmp0 = fcmp ogt float %val1, %val2
385 %cmp1 = fcmp ogt float %val3, %val4
386 %and = and i1 %cmp0, %cmp1
387 %sel = select i1 %and, i16 %val5, i16 %val6
391 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
392 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
393 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
394 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
397 define i32 @fun26(float %val1, float %val2, float %val3, float %val4,
398 i32 %val5, i32 %val6) {
399 %cmp0 = fcmp ogt float %val1, %val2
400 %cmp1 = fcmp ogt float %val3, %val4
401 %and = and i1 %cmp0, %cmp1
402 %sel = select i1 %and, i32 %val5, i32 %val6
406 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
407 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
408 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
409 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
412 define i64 @fun27(float %val1, float %val2, float %val3, float %val4,
413 i64 %val5, i64 %val6) {
414 %cmp0 = fcmp ogt float %val1, %val2
415 %cmp1 = fcmp ogt float %val3, %val4
416 %and = and i1 %cmp0, %cmp1
417 %sel = select i1 %and, i64 %val5, i64 %val6
421 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
422 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
423 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
424 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
427 define float @fun28(float %val1, float %val2, float %val3, float %val4,
428 float %val5, float %val6) {
429 %cmp0 = fcmp ogt float %val1, %val2
430 %cmp1 = fcmp ogt float %val3, %val4
431 %and = and i1 %cmp0, %cmp1
432 %sel = select i1 %and, float %val5, float %val6
436 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
437 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
438 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
439 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
442 define double @fun29(float %val1, float %val2, float %val3, float %val4,
443 double %val5, double %val6) {
444 %cmp0 = fcmp ogt float %val1, %val2
445 %cmp1 = fcmp ogt float %val3, %val4
446 %and = and i1 %cmp0, %cmp1
447 %sel = select i1 %and, double %val5, double %val6
451 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
452 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
453 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
454 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
457 define i8 @fun30(double %val1, double %val2, double %val3, double %val4,
458 i8 %val5, i8 %val6) {
459 %cmp0 = fcmp ogt double %val1, %val2
460 %cmp1 = fcmp ogt double %val3, %val4
461 %and = and i1 %cmp0, %cmp1
462 %sel = select i1 %and, i8 %val5, i8 %val6
466 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
467 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
468 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
469 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
472 define i16 @fun31(double %val1, double %val2, double %val3, double %val4,
473 i16 %val5, i16 %val6) {
474 %cmp0 = fcmp ogt double %val1, %val2
475 %cmp1 = fcmp ogt double %val3, %val4
476 %and = and i1 %cmp0, %cmp1
477 %sel = select i1 %and, i16 %val5, i16 %val6
481 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
482 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
483 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
484 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
487 define i32 @fun32(double %val1, double %val2, double %val3, double %val4,
488 i32 %val5, i32 %val6) {
489 %cmp0 = fcmp ogt double %val1, %val2
490 %cmp1 = fcmp ogt double %val3, %val4
491 %and = and i1 %cmp0, %cmp1
492 %sel = select i1 %and, i32 %val5, i32 %val6
496 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
497 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
498 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
499 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
502 define i64 @fun33(double %val1, double %val2, double %val3, double %val4,
503 i64 %val5, i64 %val6) {
504 %cmp0 = fcmp ogt double %val1, %val2
505 %cmp1 = fcmp ogt double %val3, %val4
506 %and = and i1 %cmp0, %cmp1
507 %sel = select i1 %and, i64 %val5, i64 %val6
511 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
512 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
513 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
514 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
517 define float @fun34(double %val1, double %val2, double %val3, double %val4,
518 float %val5, float %val6) {
519 %cmp0 = fcmp ogt double %val1, %val2
520 %cmp1 = fcmp ogt double %val3, %val4
521 %and = and i1 %cmp0, %cmp1
522 %sel = select i1 %and, float %val5, float %val6
526 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
527 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
528 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
529 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
532 define double @fun35(double %val1, double %val2, double %val3, double %val4,
533 double %val5, double %val6) {
534 %cmp0 = fcmp ogt double %val1, %val2
535 %cmp1 = fcmp ogt double %val3, %val4
536 %and = and i1 %cmp0, %cmp1
537 %sel = select i1 %and, double %val5, double %val6
541 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
542 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
543 ; CHECK: cost of 1 for instruction: %and = and i1 %cmp0, %cmp1
544 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
547 define i8 @fun36(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
548 i8 %val5, i8 %val6) {
549 %cmp0 = icmp eq i8 %val1, %val2
550 %cmp1 = icmp eq i8 %val3, %val4
551 %and = or i1 %cmp0, %cmp1
552 %sel = select i1 %and, i8 %val5, i8 %val6
556 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
557 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
558 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
559 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
562 define i16 @fun37(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
563 i16 %val5, i16 %val6) {
564 %cmp0 = icmp eq i8 %val1, %val2
565 %cmp1 = icmp eq i8 %val3, %val4
566 %and = or i1 %cmp0, %cmp1
567 %sel = select i1 %and, i16 %val5, i16 %val6
571 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
572 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
573 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
574 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
577 define i32 @fun38(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
578 i32 %val5, i32 %val6) {
579 %cmp0 = icmp eq i8 %val1, %val2
580 %cmp1 = icmp eq i8 %val3, %val4
581 %and = or i1 %cmp0, %cmp1
582 %sel = select i1 %and, i32 %val5, i32 %val6
586 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
587 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
588 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
589 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
592 define i64 @fun39(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
593 i64 %val5, i64 %val6) {
594 %cmp0 = icmp eq i8 %val1, %val2
595 %cmp1 = icmp eq i8 %val3, %val4
596 %and = or i1 %cmp0, %cmp1
597 %sel = select i1 %and, i64 %val5, i64 %val6
601 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
602 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
603 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
604 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
607 define float @fun40(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
608 float %val5, float %val6) {
609 %cmp0 = icmp eq i8 %val1, %val2
610 %cmp1 = icmp eq i8 %val3, %val4
611 %and = or i1 %cmp0, %cmp1
612 %sel = select i1 %and, float %val5, float %val6
616 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
617 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
618 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
619 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
622 define double @fun41(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
623 double %val5, double %val6) {
624 %cmp0 = icmp eq i8 %val1, %val2
625 %cmp1 = icmp eq i8 %val3, %val4
626 %and = or i1 %cmp0, %cmp1
627 %sel = select i1 %and, double %val5, double %val6
631 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
632 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
633 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
634 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
637 define i8 @fun42(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
638 i8 %val5, i8 %val6) {
639 %cmp0 = icmp eq i16 %val1, %val2
640 %cmp1 = icmp eq i16 %val3, %val4
641 %and = or i1 %cmp0, %cmp1
642 %sel = select i1 %and, i8 %val5, i8 %val6
646 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
647 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
648 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
649 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
652 define i16 @fun43(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
653 i16 %val5, i16 %val6) {
654 %cmp0 = icmp eq i16 %val1, %val2
655 %cmp1 = icmp eq i16 %val3, %val4
656 %and = or i1 %cmp0, %cmp1
657 %sel = select i1 %and, i16 %val5, i16 %val6
661 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
662 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
663 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
664 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
667 define i32 @fun44(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
668 i32 %val5, i32 %val6) {
669 %cmp0 = icmp eq i16 %val1, %val2
670 %cmp1 = icmp eq i16 %val3, %val4
671 %and = or i1 %cmp0, %cmp1
672 %sel = select i1 %and, i32 %val5, i32 %val6
676 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
677 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
678 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
679 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
682 define i64 @fun45(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
683 i64 %val5, i64 %val6) {
684 %cmp0 = icmp eq i16 %val1, %val2
685 %cmp1 = icmp eq i16 %val3, %val4
686 %and = or i1 %cmp0, %cmp1
687 %sel = select i1 %and, i64 %val5, i64 %val6
691 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
692 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
693 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
694 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
697 define float @fun46(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
698 float %val5, float %val6) {
699 %cmp0 = icmp eq i16 %val1, %val2
700 %cmp1 = icmp eq i16 %val3, %val4
701 %and = or i1 %cmp0, %cmp1
702 %sel = select i1 %and, float %val5, float %val6
706 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
707 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
708 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
709 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
712 define double @fun47(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
713 double %val5, double %val6) {
714 %cmp0 = icmp eq i16 %val1, %val2
715 %cmp1 = icmp eq i16 %val3, %val4
716 %and = or i1 %cmp0, %cmp1
717 %sel = select i1 %and, double %val5, double %val6
721 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
722 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
723 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
724 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
727 define i8 @fun48(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
728 i8 %val5, i8 %val6) {
729 %cmp0 = icmp eq i32 %val1, %val2
730 %cmp1 = icmp eq i32 %val3, %val4
731 %and = or i1 %cmp0, %cmp1
732 %sel = select i1 %and, i8 %val5, i8 %val6
736 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
737 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
738 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
739 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
742 define i16 @fun49(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
743 i16 %val5, i16 %val6) {
744 %cmp0 = icmp eq i32 %val1, %val2
745 %cmp1 = icmp eq i32 %val3, %val4
746 %and = or i1 %cmp0, %cmp1
747 %sel = select i1 %and, i16 %val5, i16 %val6
751 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
752 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
753 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
754 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
757 define i32 @fun50(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
758 i32 %val5, i32 %val6) {
759 %cmp0 = icmp eq i32 %val1, %val2
760 %cmp1 = icmp eq i32 %val3, %val4
761 %and = or i1 %cmp0, %cmp1
762 %sel = select i1 %and, i32 %val5, i32 %val6
766 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
767 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
768 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
769 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
772 define i64 @fun51(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
773 i64 %val5, i64 %val6) {
774 %cmp0 = icmp eq i32 %val1, %val2
775 %cmp1 = icmp eq i32 %val3, %val4
776 %and = or i1 %cmp0, %cmp1
777 %sel = select i1 %and, i64 %val5, i64 %val6
781 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
782 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
783 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
784 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
787 define float @fun52(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
788 float %val5, float %val6) {
789 %cmp0 = icmp eq i32 %val1, %val2
790 %cmp1 = icmp eq i32 %val3, %val4
791 %and = or i1 %cmp0, %cmp1
792 %sel = select i1 %and, float %val5, float %val6
796 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
797 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
798 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
799 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
802 define double @fun53(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
803 double %val5, double %val6) {
804 %cmp0 = icmp eq i32 %val1, %val2
805 %cmp1 = icmp eq i32 %val3, %val4
806 %and = or i1 %cmp0, %cmp1
807 %sel = select i1 %and, double %val5, double %val6
811 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
812 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
813 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
814 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
817 define i8 @fun54(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
818 i8 %val5, i8 %val6) {
819 %cmp0 = icmp eq i64 %val1, %val2
820 %cmp1 = icmp eq i64 %val3, %val4
821 %and = or i1 %cmp0, %cmp1
822 %sel = select i1 %and, i8 %val5, i8 %val6
826 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
827 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
828 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
829 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
832 define i16 @fun55(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
833 i16 %val5, i16 %val6) {
834 %cmp0 = icmp eq i64 %val1, %val2
835 %cmp1 = icmp eq i64 %val3, %val4
836 %and = or i1 %cmp0, %cmp1
837 %sel = select i1 %and, i16 %val5, i16 %val6
841 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
842 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
843 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
844 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
847 define i32 @fun56(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
848 i32 %val5, i32 %val6) {
849 %cmp0 = icmp eq i64 %val1, %val2
850 %cmp1 = icmp eq i64 %val3, %val4
851 %and = or i1 %cmp0, %cmp1
852 %sel = select i1 %and, i32 %val5, i32 %val6
856 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
857 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
858 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
859 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
862 define i64 @fun57(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
863 i64 %val5, i64 %val6) {
864 %cmp0 = icmp eq i64 %val1, %val2
865 %cmp1 = icmp eq i64 %val3, %val4
866 %and = or i1 %cmp0, %cmp1
867 %sel = select i1 %and, i64 %val5, i64 %val6
871 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
872 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
873 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
874 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
877 define float @fun58(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
878 float %val5, float %val6) {
879 %cmp0 = icmp eq i64 %val1, %val2
880 %cmp1 = icmp eq i64 %val3, %val4
881 %and = or i1 %cmp0, %cmp1
882 %sel = select i1 %and, float %val5, float %val6
886 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
887 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
888 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
889 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
892 define double @fun59(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
893 double %val5, double %val6) {
894 %cmp0 = icmp eq i64 %val1, %val2
895 %cmp1 = icmp eq i64 %val3, %val4
896 %and = or i1 %cmp0, %cmp1
897 %sel = select i1 %and, double %val5, double %val6
901 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
902 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
903 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
904 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
907 define i8 @fun60(float %val1, float %val2, float %val3, float %val4,
908 i8 %val5, i8 %val6) {
909 %cmp0 = fcmp ogt float %val1, %val2
910 %cmp1 = fcmp ogt float %val3, %val4
911 %and = or i1 %cmp0, %cmp1
912 %sel = select i1 %and, i8 %val5, i8 %val6
916 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
917 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
918 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
919 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
922 define i16 @fun61(float %val1, float %val2, float %val3, float %val4,
923 i16 %val5, i16 %val6) {
924 %cmp0 = fcmp ogt float %val1, %val2
925 %cmp1 = fcmp ogt float %val3, %val4
926 %and = or i1 %cmp0, %cmp1
927 %sel = select i1 %and, i16 %val5, i16 %val6
931 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
932 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
933 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
934 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
937 define i32 @fun62(float %val1, float %val2, float %val3, float %val4,
938 i32 %val5, i32 %val6) {
939 %cmp0 = fcmp ogt float %val1, %val2
940 %cmp1 = fcmp ogt float %val3, %val4
941 %and = or i1 %cmp0, %cmp1
942 %sel = select i1 %and, i32 %val5, i32 %val6
946 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
947 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
948 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
949 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
952 define i64 @fun63(float %val1, float %val2, float %val3, float %val4,
953 i64 %val5, i64 %val6) {
954 %cmp0 = fcmp ogt float %val1, %val2
955 %cmp1 = fcmp ogt float %val3, %val4
956 %and = or i1 %cmp0, %cmp1
957 %sel = select i1 %and, i64 %val5, i64 %val6
961 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
962 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
963 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
964 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
967 define float @fun64(float %val1, float %val2, float %val3, float %val4,
968 float %val5, float %val6) {
969 %cmp0 = fcmp ogt float %val1, %val2
970 %cmp1 = fcmp ogt float %val3, %val4
971 %and = or i1 %cmp0, %cmp1
972 %sel = select i1 %and, float %val5, float %val6
976 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
977 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
978 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
979 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
982 define double @fun65(float %val1, float %val2, float %val3, float %val4,
983 double %val5, double %val6) {
984 %cmp0 = fcmp ogt float %val1, %val2
985 %cmp1 = fcmp ogt float %val3, %val4
986 %and = or i1 %cmp0, %cmp1
987 %sel = select i1 %and, double %val5, double %val6
991 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
992 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
993 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
994 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
997 define i8 @fun66(double %val1, double %val2, double %val3, double %val4,
998 i8 %val5, i8 %val6) {
999 %cmp0 = fcmp ogt double %val1, %val2
1000 %cmp1 = fcmp ogt double %val3, %val4
1001 %and = or i1 %cmp0, %cmp1
1002 %sel = select i1 %and, i8 %val5, i8 %val6
1006 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1007 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1008 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
1009 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
1012 define i16 @fun67(double %val1, double %val2, double %val3, double %val4,
1013 i16 %val5, i16 %val6) {
1014 %cmp0 = fcmp ogt double %val1, %val2
1015 %cmp1 = fcmp ogt double %val3, %val4
1016 %and = or i1 %cmp0, %cmp1
1017 %sel = select i1 %and, i16 %val5, i16 %val6
1021 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1022 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1023 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
1024 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
1027 define i32 @fun68(double %val1, double %val2, double %val3, double %val4,
1028 i32 %val5, i32 %val6) {
1029 %cmp0 = fcmp ogt double %val1, %val2
1030 %cmp1 = fcmp ogt double %val3, %val4
1031 %and = or i1 %cmp0, %cmp1
1032 %sel = select i1 %and, i32 %val5, i32 %val6
1036 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1037 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1038 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
1039 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
1042 define i64 @fun69(double %val1, double %val2, double %val3, double %val4,
1043 i64 %val5, i64 %val6) {
1044 %cmp0 = fcmp ogt double %val1, %val2
1045 %cmp1 = fcmp ogt double %val3, %val4
1046 %and = or i1 %cmp0, %cmp1
1047 %sel = select i1 %and, i64 %val5, i64 %val6
1051 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1052 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1053 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
1054 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
1057 define float @fun70(double %val1, double %val2, double %val3, double %val4,
1058 float %val5, float %val6) {
1059 %cmp0 = fcmp ogt double %val1, %val2
1060 %cmp1 = fcmp ogt double %val3, %val4
1061 %and = or i1 %cmp0, %cmp1
1062 %sel = select i1 %and, float %val5, float %val6
1066 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1067 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1068 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
1069 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
1072 define double @fun71(double %val1, double %val2, double %val3, double %val4,
1073 double %val5, double %val6) {
1074 %cmp0 = fcmp ogt double %val1, %val2
1075 %cmp1 = fcmp ogt double %val3, %val4
1076 %and = or i1 %cmp0, %cmp1
1077 %sel = select i1 %and, double %val5, double %val6
1081 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1082 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1083 ; CHECK: cost of 1 for instruction: %and = or i1 %cmp0, %cmp1
1084 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
1087 define i8 @fun72(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
1088 i8 %val5, i8 %val6) {
1089 %cmp0 = icmp eq i8 %val1, %val2
1090 %cmp1 = icmp eq i8 %val3, %val4
1091 %and = xor i1 %cmp0, %cmp1
1092 %sel = select i1 %and, i8 %val5, i8 %val6
1096 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
1097 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
1098 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1099 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1100 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
1103 define i16 @fun73(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
1104 i16 %val5, i16 %val6) {
1105 %cmp0 = icmp eq i8 %val1, %val2
1106 %cmp1 = icmp eq i8 %val3, %val4
1107 %and = xor i1 %cmp0, %cmp1
1108 %sel = select i1 %and, i16 %val5, i16 %val6
1112 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
1113 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
1114 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1115 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1116 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
1119 define i32 @fun74(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
1120 i32 %val5, i32 %val6) {
1121 %cmp0 = icmp eq i8 %val1, %val2
1122 %cmp1 = icmp eq i8 %val3, %val4
1123 %and = xor i1 %cmp0, %cmp1
1124 %sel = select i1 %and, i32 %val5, i32 %val6
1128 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
1129 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
1130 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1131 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1132 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
1135 define i64 @fun75(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
1136 i64 %val5, i64 %val6) {
1137 %cmp0 = icmp eq i8 %val1, %val2
1138 %cmp1 = icmp eq i8 %val3, %val4
1139 %and = xor i1 %cmp0, %cmp1
1140 %sel = select i1 %and, i64 %val5, i64 %val6
1144 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
1145 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
1146 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1147 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1148 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
1151 define float @fun76(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
1152 float %val5, float %val6) {
1153 %cmp0 = icmp eq i8 %val1, %val2
1154 %cmp1 = icmp eq i8 %val3, %val4
1155 %and = xor i1 %cmp0, %cmp1
1156 %sel = select i1 %and, float %val5, float %val6
1160 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
1161 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
1162 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1163 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1164 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
1167 define double @fun77(i8 %val1, i8 %val2, i8 %val3, i8 %val4,
1168 double %val5, double %val6) {
1169 %cmp0 = icmp eq i8 %val1, %val2
1170 %cmp1 = icmp eq i8 %val3, %val4
1171 %and = xor i1 %cmp0, %cmp1
1172 %sel = select i1 %and, double %val5, double %val6
1176 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i8 %val1, %val2
1177 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i8 %val3, %val4
1178 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1179 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1180 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
1183 define i8 @fun78(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
1184 i8 %val5, i8 %val6) {
1185 %cmp0 = icmp eq i16 %val1, %val2
1186 %cmp1 = icmp eq i16 %val3, %val4
1187 %and = xor i1 %cmp0, %cmp1
1188 %sel = select i1 %and, i8 %val5, i8 %val6
1192 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
1193 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
1194 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1195 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1196 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
1199 define i16 @fun79(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
1200 i16 %val5, i16 %val6) {
1201 %cmp0 = icmp eq i16 %val1, %val2
1202 %cmp1 = icmp eq i16 %val3, %val4
1203 %and = xor i1 %cmp0, %cmp1
1204 %sel = select i1 %and, i16 %val5, i16 %val6
1208 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
1209 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
1210 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1211 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1212 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
1215 define i32 @fun80(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
1216 i32 %val5, i32 %val6) {
1217 %cmp0 = icmp eq i16 %val1, %val2
1218 %cmp1 = icmp eq i16 %val3, %val4
1219 %and = xor i1 %cmp0, %cmp1
1220 %sel = select i1 %and, i32 %val5, i32 %val6
1224 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
1225 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
1226 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1227 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1228 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
1231 define i64 @fun81(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
1232 i64 %val5, i64 %val6) {
1233 %cmp0 = icmp eq i16 %val1, %val2
1234 %cmp1 = icmp eq i16 %val3, %val4
1235 %and = xor i1 %cmp0, %cmp1
1236 %sel = select i1 %and, i64 %val5, i64 %val6
1240 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
1241 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
1242 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1243 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1244 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
1247 define float @fun82(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
1248 float %val5, float %val6) {
1249 %cmp0 = icmp eq i16 %val1, %val2
1250 %cmp1 = icmp eq i16 %val3, %val4
1251 %and = xor i1 %cmp0, %cmp1
1252 %sel = select i1 %and, float %val5, float %val6
1256 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
1257 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
1258 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1259 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1260 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
1263 define double @fun83(i16 %val1, i16 %val2, i16 %val3, i16 %val4,
1264 double %val5, double %val6) {
1265 %cmp0 = icmp eq i16 %val1, %val2
1266 %cmp1 = icmp eq i16 %val3, %val4
1267 %and = xor i1 %cmp0, %cmp1
1268 %sel = select i1 %and, double %val5, double %val6
1272 ; CHECK: cost of 3 for instruction: %cmp0 = icmp eq i16 %val1, %val2
1273 ; CHECK: cost of 3 for instruction: %cmp1 = icmp eq i16 %val3, %val4
1274 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1275 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1276 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
1279 define i8 @fun84(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
1280 i8 %val5, i8 %val6) {
1281 %cmp0 = icmp eq i32 %val1, %val2
1282 %cmp1 = icmp eq i32 %val3, %val4
1283 %and = xor i1 %cmp0, %cmp1
1284 %sel = select i1 %and, i8 %val5, i8 %val6
1288 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
1289 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
1290 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1291 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1292 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
1295 define i16 @fun85(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
1296 i16 %val5, i16 %val6) {
1297 %cmp0 = icmp eq i32 %val1, %val2
1298 %cmp1 = icmp eq i32 %val3, %val4
1299 %and = xor i1 %cmp0, %cmp1
1300 %sel = select i1 %and, i16 %val5, i16 %val6
1304 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
1305 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
1306 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1307 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1308 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
1311 define i32 @fun86(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
1312 i32 %val5, i32 %val6) {
1313 %cmp0 = icmp eq i32 %val1, %val2
1314 %cmp1 = icmp eq i32 %val3, %val4
1315 %and = xor i1 %cmp0, %cmp1
1316 %sel = select i1 %and, i32 %val5, i32 %val6
1320 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
1321 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
1322 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1323 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1324 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
1327 define i64 @fun87(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
1328 i64 %val5, i64 %val6) {
1329 %cmp0 = icmp eq i32 %val1, %val2
1330 %cmp1 = icmp eq i32 %val3, %val4
1331 %and = xor i1 %cmp0, %cmp1
1332 %sel = select i1 %and, i64 %val5, i64 %val6
1336 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
1337 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
1338 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1339 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1340 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
1343 define float @fun88(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
1344 float %val5, float %val6) {
1345 %cmp0 = icmp eq i32 %val1, %val2
1346 %cmp1 = icmp eq i32 %val3, %val4
1347 %and = xor i1 %cmp0, %cmp1
1348 %sel = select i1 %and, float %val5, float %val6
1352 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
1353 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
1354 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1355 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1356 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
1359 define double @fun89(i32 %val1, i32 %val2, i32 %val3, i32 %val4,
1360 double %val5, double %val6) {
1361 %cmp0 = icmp eq i32 %val1, %val2
1362 %cmp1 = icmp eq i32 %val3, %val4
1363 %and = xor i1 %cmp0, %cmp1
1364 %sel = select i1 %and, double %val5, double %val6
1368 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i32 %val1, %val2
1369 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i32 %val3, %val4
1370 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1371 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1372 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
1375 define i8 @fun90(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
1376 i8 %val5, i8 %val6) {
1377 %cmp0 = icmp eq i64 %val1, %val2
1378 %cmp1 = icmp eq i64 %val3, %val4
1379 %and = xor i1 %cmp0, %cmp1
1380 %sel = select i1 %and, i8 %val5, i8 %val6
1384 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
1385 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
1386 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1387 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1388 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
1391 define i16 @fun91(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
1392 i16 %val5, i16 %val6) {
1393 %cmp0 = icmp eq i64 %val1, %val2
1394 %cmp1 = icmp eq i64 %val3, %val4
1395 %and = xor i1 %cmp0, %cmp1
1396 %sel = select i1 %and, i16 %val5, i16 %val6
1400 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
1401 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
1402 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1403 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1404 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
1407 define i32 @fun92(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
1408 i32 %val5, i32 %val6) {
1409 %cmp0 = icmp eq i64 %val1, %val2
1410 %cmp1 = icmp eq i64 %val3, %val4
1411 %and = xor i1 %cmp0, %cmp1
1412 %sel = select i1 %and, i32 %val5, i32 %val6
1416 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
1417 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
1418 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1419 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1420 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
1423 define i64 @fun93(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
1424 i64 %val5, i64 %val6) {
1425 %cmp0 = icmp eq i64 %val1, %val2
1426 %cmp1 = icmp eq i64 %val3, %val4
1427 %and = xor i1 %cmp0, %cmp1
1428 %sel = select i1 %and, i64 %val5, i64 %val6
1432 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
1433 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
1434 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1435 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1436 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
1439 define float @fun94(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
1440 float %val5, float %val6) {
1441 %cmp0 = icmp eq i64 %val1, %val2
1442 %cmp1 = icmp eq i64 %val3, %val4
1443 %and = xor i1 %cmp0, %cmp1
1444 %sel = select i1 %and, float %val5, float %val6
1448 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
1449 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
1450 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1451 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1452 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
1455 define double @fun95(i64 %val1, i64 %val2, i64 %val3, i64 %val4,
1456 double %val5, double %val6) {
1457 %cmp0 = icmp eq i64 %val1, %val2
1458 %cmp1 = icmp eq i64 %val3, %val4
1459 %and = xor i1 %cmp0, %cmp1
1460 %sel = select i1 %and, double %val5, double %val6
1464 ; CHECK: cost of 1 for instruction: %cmp0 = icmp eq i64 %val1, %val2
1465 ; CHECK: cost of 1 for instruction: %cmp1 = icmp eq i64 %val3, %val4
1466 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1467 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1468 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
1471 define i8 @fun96(float %val1, float %val2, float %val3, float %val4,
1472 i8 %val5, i8 %val6) {
1473 %cmp0 = fcmp ogt float %val1, %val2
1474 %cmp1 = fcmp ogt float %val3, %val4
1475 %and = xor i1 %cmp0, %cmp1
1476 %sel = select i1 %and, i8 %val5, i8 %val6
1480 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
1481 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
1482 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1483 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1484 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
1487 define i16 @fun97(float %val1, float %val2, float %val3, float %val4,
1488 i16 %val5, i16 %val6) {
1489 %cmp0 = fcmp ogt float %val1, %val2
1490 %cmp1 = fcmp ogt float %val3, %val4
1491 %and = xor i1 %cmp0, %cmp1
1492 %sel = select i1 %and, i16 %val5, i16 %val6
1496 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
1497 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
1498 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1499 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1500 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
1503 define i32 @fun98(float %val1, float %val2, float %val3, float %val4,
1504 i32 %val5, i32 %val6) {
1505 %cmp0 = fcmp ogt float %val1, %val2
1506 %cmp1 = fcmp ogt float %val3, %val4
1507 %and = xor i1 %cmp0, %cmp1
1508 %sel = select i1 %and, i32 %val5, i32 %val6
1512 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
1513 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
1514 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1515 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1516 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
1519 define i64 @fun99(float %val1, float %val2, float %val3, float %val4,
1520 i64 %val5, i64 %val6) {
1521 %cmp0 = fcmp ogt float %val1, %val2
1522 %cmp1 = fcmp ogt float %val3, %val4
1523 %and = xor i1 %cmp0, %cmp1
1524 %sel = select i1 %and, i64 %val5, i64 %val6
1528 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
1529 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
1530 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1531 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1532 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
1535 define float @fun100(float %val1, float %val2, float %val3, float %val4,
1536 float %val5, float %val6) {
1537 %cmp0 = fcmp ogt float %val1, %val2
1538 %cmp1 = fcmp ogt float %val3, %val4
1539 %and = xor i1 %cmp0, %cmp1
1540 %sel = select i1 %and, float %val5, float %val6
1544 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
1545 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
1546 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1547 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1548 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
1551 define double @fun101(float %val1, float %val2, float %val3, float %val4,
1552 double %val5, double %val6) {
1553 %cmp0 = fcmp ogt float %val1, %val2
1554 %cmp1 = fcmp ogt float %val3, %val4
1555 %and = xor i1 %cmp0, %cmp1
1556 %sel = select i1 %and, double %val5, double %val6
1560 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt float %val1, %val2
1561 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt float %val3, %val4
1562 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1563 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1564 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6
1567 define i8 @fun102(double %val1, double %val2, double %val3, double %val4,
1568 i8 %val5, i8 %val6) {
1569 %cmp0 = fcmp ogt double %val1, %val2
1570 %cmp1 = fcmp ogt double %val3, %val4
1571 %and = xor i1 %cmp0, %cmp1
1572 %sel = select i1 %and, i8 %val5, i8 %val6
1576 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1577 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1578 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1579 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1580 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i8 %val5, i8 %val6
1583 define i16 @fun103(double %val1, double %val2, double %val3, double %val4,
1584 i16 %val5, i16 %val6) {
1585 %cmp0 = fcmp ogt double %val1, %val2
1586 %cmp1 = fcmp ogt double %val3, %val4
1587 %and = xor i1 %cmp0, %cmp1
1588 %sel = select i1 %and, i16 %val5, i16 %val6
1592 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1593 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1594 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1595 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1596 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i16 %val5, i16 %val6
1599 define i32 @fun104(double %val1, double %val2, double %val3, double %val4,
1600 i32 %val5, i32 %val6) {
1601 %cmp0 = fcmp ogt double %val1, %val2
1602 %cmp1 = fcmp ogt double %val3, %val4
1603 %and = xor i1 %cmp0, %cmp1
1604 %sel = select i1 %and, i32 %val5, i32 %val6
1608 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1609 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1610 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1611 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1612 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i32 %val5, i32 %val6
1615 define i64 @fun105(double %val1, double %val2, double %val3, double %val4,
1616 i64 %val5, i64 %val6) {
1617 %cmp0 = fcmp ogt double %val1, %val2
1618 %cmp1 = fcmp ogt double %val3, %val4
1619 %and = xor i1 %cmp0, %cmp1
1620 %sel = select i1 %and, i64 %val5, i64 %val6
1624 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1625 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1626 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1627 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1628 ; CHECK: cost of 1 for instruction: %sel = select i1 %and, i64 %val5, i64 %val6
1631 define float @fun106(double %val1, double %val2, double %val3, double %val4,
1632 float %val5, float %val6) {
1633 %cmp0 = fcmp ogt double %val1, %val2
1634 %cmp1 = fcmp ogt double %val3, %val4
1635 %and = xor i1 %cmp0, %cmp1
1636 %sel = select i1 %and, float %val5, float %val6
1640 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1641 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1642 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1643 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1644 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, float %val5, float %val6
1647 define double @fun107(double %val1, double %val2, double %val3, double %val4,
1648 double %val5, double %val6) {
1649 %cmp0 = fcmp ogt double %val1, %val2
1650 %cmp1 = fcmp ogt double %val3, %val4
1651 %and = xor i1 %cmp0, %cmp1
1652 %sel = select i1 %and, double %val5, double %val6
1656 ; CHECK: cost of 1 for instruction: %cmp0 = fcmp ogt double %val1, %val2
1657 ; CHECK: cost of 1 for instruction: %cmp1 = fcmp ogt double %val3, %val4
1658 ; CHECK: cost of 5 for instruction: %and = xor i1 %cmp0, %cmp1
1659 ; IPMSQ: cost of 7 for instruction: %and = xor i1 %cmp0, %cmp1
1660 ; CHECK: cost of 4 for instruction: %sel = select i1 %and, double %val5, double %val6