1; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
2;
3; Costs for conversion of i1 vectors to vectors of double.
4
5define <2 x double> @fun0(<2 x i8> %val1, <2 x i8> %val2) {
6  %cmp = icmp eq <2 x i8> %val1, %val2
7  %v = uitofp <2 x i1> %cmp to <2 x double>
8  ret <2 x double> %v
9
10; CHECK: fun0
11; CHECK: cost of 1 for instruction:   %cmp = icmp eq <2 x i8> %val1, %val2
12; CHECK: cost of 5 for instruction:   %v = uitofp <2 x i1> %cmp to <2 x double>
13}
14
15define <2 x double> @fun1(<2 x i8> %val1, <2 x i8> %val2) {
16  %cmp = icmp eq <2 x i8> %val1, %val2
17  %v = sitofp <2 x i1> %cmp to <2 x double>
18  ret <2 x double> %v
19
20; CHECK: fun1
21; CHECK: cost of 1 for instruction:   %cmp = icmp eq <2 x i8> %val1, %val2
22; CHECK: cost of 4 for instruction:   %v = sitofp <2 x i1> %cmp to <2 x double>
23}
24
25define <2 x double> @fun2(<2 x i64> %val1, <2 x i64> %val2) {
26  %cmp = icmp eq <2 x i64> %val1, %val2
27  %v = uitofp <2 x i1> %cmp to <2 x double>
28  ret <2 x double> %v
29
30; CHECK: fun2
31; CHECK: cost of 1 for instruction:   %cmp = icmp eq <2 x i64> %val1, %val2
32; CHECK: cost of 2 for instruction:   %v = uitofp <2 x i1> %cmp to <2 x double>
33}
34
35define <2 x double> @fun3(<2 x i64> %val1, <2 x i64> %val2) {
36  %cmp = icmp eq <2 x i64> %val1, %val2
37  %v = sitofp <2 x i1> %cmp to <2 x double>
38  ret <2 x double> %v
39
40; CHECK: fun3
41; CHECK: cost of 1 for instruction:   %cmp = icmp eq <2 x i64> %val1, %val2
42; CHECK: cost of 1 for instruction:   %v = sitofp <2 x i1> %cmp to <2 x double>
43}
44