1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2; RUN: opt -passes='print<cost-model>' 2>&1 -disable-output -mtriple=aarch64-none-linux-gnueabi %s | FileCheck --check-prefixes=CHECK,CHECK-NOFP16 %s
3; RUN: opt -passes='print<cost-model>' 2>&1 -disable-output -mtriple=aarch64-none-linux-gnueabi -mattr=+fullfp16 %s | FileCheck --check-prefixes=CHECK,CHECK-FP16 %s
4
5define void @ext() {
6; CHECK-LABEL: 'ext'
7; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r0 = sext i1 undef to i8
8; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r1 = zext i1 undef to i8
9; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r2 = sext i1 undef to i16
10; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r3 = zext i1 undef to i16
11; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r4 = sext i1 undef to i32
12; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r5 = zext i1 undef to i32
13; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r6 = sext i1 undef to i64
14; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r7 = zext i1 undef to i64
15; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r9 = sext i8 undef to i16
16; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r10 = zext i8 undef to i16
17; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r11 = sext i8 undef to i32
18; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r12 = zext i8 undef to i32
19; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r13 = sext i8 undef to i64
20; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r14 = zext i8 undef to i64
21; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r17 = sext i16 undef to i32
22; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r18 = zext i16 undef to i32
23; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r19 = sext i16 undef to i64
24; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r20 = zext i16 undef to i64
25; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r24 = sext i32 undef to i64
26; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r25 = zext i32 undef to i64
27; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s2i8i16 = sext <2 x i8> undef to <2 x i16>
28; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z2i8i16 = zext <2 x i8> undef to <2 x i16>
29; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s2i8i32 = sext <2 x i8> undef to <2 x i32>
30; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z2i8i32 = zext <2 x i8> undef to <2 x i32>
31; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s2i8i64 = sext <2 x i8> undef to <2 x i64>
32; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z2i8i64 = zext <2 x i8> undef to <2 x i64>
33; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s2i16i32 = sext <2 x i16> undef to <2 x i32>
34; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z2i16i32 = zext <2 x i16> undef to <2 x i32>
35; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s2i16i64 = sext <2 x i16> undef to <2 x i64>
36; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z2i16i64 = zext <2 x i16> undef to <2 x i64>
37; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s2i32i64 = sext <2 x i32> undef to <2 x i64>
38; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z2i32i64 = zext <2 x i32> undef to <2 x i64>
39; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = sext <4 x i8> undef to <4 x i16>
40; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z4i8i16 = zext <4 x i8> undef to <4 x i16>
41; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s4i8i32 = sext <4 x i8> undef to <4 x i32>
42; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z4i8i32 = zext <4 x i8> undef to <4 x i32>
43; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %s4i8i64 = sext <4 x i8> undef to <4 x i64>
44; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %z4i8i64 = zext <4 x i8> undef to <4 x i64>
45; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = sext <4 x i16> undef to <4 x i32>
46; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z4i16i32 = zext <4 x i16> undef to <4 x i32>
47; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %s4i16i64 = sext <4 x i16> undef to <4 x i64>
48; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %z4i16i64 = zext <4 x i16> undef to <4 x i64>
49; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %s4i32i64 = sext <4 x i32> undef to <4 x i64>
50; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %z4i32i64 = zext <4 x i32> undef to <4 x i64>
51; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s8i8i16 = sext <8 x i8> undef to <8 x i16>
52; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z8i8i16 = zext <8 x i8> undef to <8 x i16>
53; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %s8i8i32 = sext <8 x i8> undef to <8 x i32>
54; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %z8i8i32 = zext <8 x i8> undef to <8 x i32>
55; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %s8i8i64 = sext <8 x i8> undef to <8 x i64>
56; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %z8i8i64 = zext <8 x i8> undef to <8 x i64>
57; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %s8i16i32 = sext <8 x i16> undef to <8 x i32>
58; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %z8i16i32 = zext <8 x i16> undef to <8 x i32>
59; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %s8i16i64 = sext <8 x i16> undef to <8 x i64>
60; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %z8i16i64 = zext <8 x i16> undef to <8 x i64>
61; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %s8i32i64 = sext <8 x i32> undef to <8 x i64>
62; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %z8i32i64 = zext <8 x i32> undef to <8 x i64>
63; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %s16i8i16 = sext <16 x i8> undef to <16 x i16>
64; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %z16i8i16 = zext <16 x i8> undef to <16 x i16>
65; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %s16i8i32 = sext <16 x i8> undef to <16 x i32>
66; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %z16i8i32 = zext <16 x i8> undef to <16 x i32>
67; CHECK-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %s16i8i64 = sext <16 x i8> undef to <16 x i64>
68; CHECK-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %z16i8i64 = zext <16 x i8> undef to <16 x i64>
69; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %s16i16i32 = sext <16 x i16> undef to <16 x i32>
70; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %z16i16i32 = zext <16 x i16> undef to <16 x i32>
71; CHECK-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %s16i16i64 = sext <16 x i16> undef to <16 x i64>
72; CHECK-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %z16i16i64 = zext <16 x i16> undef to <16 x i64>
73; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %s16i32i64 = sext <16 x i32> undef to <16 x i64>
74; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %z16i32i64 = zext <16 x i32> undef to <16 x i64>
75; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
76;
77  %r0 = sext i1 undef to i8
78  %r1 = zext i1 undef to i8
79  %r2 = sext i1 undef to i16
80  %r3 = zext i1 undef to i16
81  %r4 = sext i1 undef to i32
82  %r5 = zext i1 undef to i32
83  %r6 = sext i1 undef to i64
84  %r7 = zext i1 undef to i64
85  %r9 = sext i8 undef to i16
86  %r10 = zext i8 undef to i16
87  %r11 = sext i8 undef to i32
88  %r12 = zext i8 undef to i32
89  %r13 = sext i8 undef to i64
90  %r14 = zext i8 undef to i64
91  %r17 = sext i16 undef to i32
92  %r18 = zext i16 undef to i32
93  %r19 = sext i16 undef to i64
94  %r20 = zext i16 undef to i64
95  %r24 = sext i32 undef to i64
96  %r25 = zext i32 undef to i64
97
98  %s2i8i16 = sext <2 x i8> undef to <2 x i16>
99  %z2i8i16 = zext <2 x i8> undef to <2 x i16>
100  %s2i8i32 = sext <2 x i8> undef to <2 x i32>
101  %z2i8i32 = zext <2 x i8> undef to <2 x i32>
102  %s2i8i64 = sext <2 x i8> undef to <2 x i64>
103  %z2i8i64 = zext <2 x i8> undef to <2 x i64>
104  %s2i16i32 = sext <2 x i16> undef to <2 x i32>
105  %z2i16i32 = zext <2 x i16> undef to <2 x i32>
106  %s2i16i64 = sext <2 x i16> undef to <2 x i64>
107  %z2i16i64 = zext <2 x i16> undef to <2 x i64>
108  %s2i32i64 = sext <2 x i32> undef to <2 x i64>
109  %z2i32i64 = zext <2 x i32> undef to <2 x i64>
110
111  %s4i8i16 = sext <4 x i8>  undef to <4 x i16>
112  %z4i8i16 = zext <4 x i8>  undef to <4 x i16>
113  %s4i8i32 = sext <4 x i8>  undef to <4 x i32>
114  %z4i8i32 = zext <4 x i8>  undef to <4 x i32>
115  %s4i8i64 = sext <4 x i8>  undef to <4 x i64>
116  %z4i8i64 = zext <4 x i8>  undef to <4 x i64>
117  %s4i16i32 = sext <4 x i16> undef to <4 x i32>
118  %z4i16i32 = zext <4 x i16> undef to <4 x i32>
119  %s4i16i64 = sext <4 x i16> undef to <4 x i64>
120  %z4i16i64 = zext <4 x i16> undef to <4 x i64>
121  %s4i32i64 = sext <4 x i32> undef to <4 x i64>
122  %z4i32i64 = zext <4 x i32> undef to <4 x i64>
123
124  %s8i8i16 = sext <8 x i8>  undef to <8 x i16>
125  %z8i8i16 = zext <8 x i8>  undef to <8 x i16>
126  %s8i8i32 = sext <8 x i8>  undef to <8 x i32>
127  %z8i8i32 = zext <8 x i8>  undef to <8 x i32>
128  %s8i8i64 = sext <8 x i8>  undef to <8 x i64>
129  %z8i8i64 = zext <8 x i8>  undef to <8 x i64>
130  %s8i16i32 = sext <8 x i16> undef to <8 x i32>
131  %z8i16i32 = zext <8 x i16> undef to <8 x i32>
132  %s8i16i64 = sext <8 x i16> undef to <8 x i64>
133  %z8i16i64 = zext <8 x i16> undef to <8 x i64>
134  %s8i32i64 = sext <8 x i32> undef to <8 x i64>
135  %z8i32i64 = zext <8 x i32> undef to <8 x i64>
136
137  %s16i8i16 = sext <16 x i8>  undef to <16 x i16>
138  %z16i8i16 = zext <16 x i8>  undef to <16 x i16>
139  %s16i8i32 = sext <16 x i8>  undef to <16 x i32>
140  %z16i8i32 = zext <16 x i8>  undef to <16 x i32>
141  %s16i8i64 = sext <16 x i8>  undef to <16 x i64>
142  %z16i8i64 = zext <16 x i8>  undef to <16 x i64>
143  %s16i16i32 = sext <16 x i16> undef to <16 x i32>
144  %z16i16i32 = zext <16 x i16> undef to <16 x i32>
145  %s16i16i64 = sext <16 x i16> undef to <16 x i64>
146  %z16i16i64 = zext <16 x i16> undef to <16 x i64>
147  %s16i32i64 = sext <16 x i32> undef to <16 x i64>
148  %z16i32i64 = zext <16 x i32> undef to <16 x i64>
149  ret void
150}
151
152define void @trunc() {
153; CHECK-LABEL: 'trunc'
154; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r8 = trunc i8 undef to i1
155; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r15 = trunc i16 undef to i1
156; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r16 = trunc i16 undef to i8
157; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r21 = trunc i32 undef to i1
158; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r22 = trunc i32 undef to i8
159; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r23 = trunc i32 undef to i16
160; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r26 = trunc i64 undef to i1
161; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r27 = trunc i64 undef to i8
162; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r28 = trunc i64 undef to i16
163; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r29 = trunc i64 undef to i32
164; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %s2i8i16 = trunc <2 x i16> undef to <2 x i8>
165; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %s2i8i32 = trunc <2 x i32> undef to <2 x i8>
166; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s2i8i64 = trunc <2 x i64> undef to <2 x i8>
167; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %s2i16i32 = trunc <2 x i32> undef to <2 x i16>
168; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s2i16i64 = trunc <2 x i64> undef to <2 x i16>
169; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s2i32i64 = trunc <2 x i64> undef to <2 x i32>
170; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %s4i8i16 = trunc <4 x i16> undef to <4 x i8>
171; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s4i8i32 = trunc <4 x i32> undef to <4 x i8>
172; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %s4i8i64 = trunc <4 x i64> undef to <4 x i8>
173; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = trunc <4 x i32> undef to <4 x i16>
174; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %s4i16i64 = trunc <4 x i64> undef to <4 x i16>
175; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %s4i32i64 = trunc <4 x i64> undef to <4 x i32>
176; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s8i8i16 = trunc <8 x i16> undef to <8 x i8>
177; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %s8i8i32 = trunc <8 x i32> undef to <8 x i8>
178; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %s8i8i64 = trunc <8 x i64> undef to <8 x i8>
179; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %s8i16i32 = trunc <8 x i32> undef to <8 x i16>
180; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %s8i16i64 = trunc <8 x i64> undef to <8 x i16>
181; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %s8i32i64 = trunc <8 x i64> undef to <8 x i32>
182; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %s16i8i16 = trunc <16 x i16> undef to <16 x i8>
183; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %s16i8i32 = trunc <16 x i32> undef to <16 x i8>
184; CHECK-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %s16i8i64 = trunc <16 x i64> undef to <16 x i8>
185; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %s16i16i32 = trunc <16 x i32> undef to <16 x i16>
186; CHECK-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %s16i16i64 = trunc <16 x i64> undef to <16 x i16>
187; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %s16i32i64 = trunc <16 x i64> undef to <16 x i32>
188; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
189;
190  %r8 = trunc i8 undef to i1
191  %r15 = trunc i16 undef to i1
192  %r16 = trunc i16 undef to i8
193  %r21 = trunc i32 undef to i1
194  %r22 = trunc i32 undef to i8
195  %r23 = trunc i32 undef to i16
196  %r26 = trunc i64 undef to i1
197  %r27 = trunc i64 undef to i8
198  %r28 = trunc i64 undef to i16
199  %r29 = trunc i64 undef to i32
200
201  %s2i8i16 = trunc <2 x i16> undef to <2 x i8>
202  %s2i8i32 = trunc <2 x i32> undef to <2 x i8>
203  %s2i8i64 = trunc <2 x i64> undef to <2 x i8>
204  %s2i16i32 = trunc <2 x i32> undef to <2 x i16>
205  %s2i16i64 = trunc <2 x i64> undef to <2 x i16>
206  %s2i32i64 = trunc <2 x i64> undef to <2 x i32>
207
208  %s4i8i16 = trunc <4 x i16> undef to <4 x i8>
209  %s4i8i32 = trunc <4 x i32> undef to <4 x i8>
210  %s4i8i64 = trunc <4 x i64> undef to <4 x i8>
211  %s4i16i32 = trunc <4 x i32> undef to <4 x i16>
212  %s4i16i64 = trunc <4 x i64> undef to <4 x i16>
213  %s4i32i64 = trunc <4 x i64> undef to <4 x i32>
214
215  %s8i8i16 = trunc <8 x i16> undef to <8 x i8>
216  %s8i8i32 = trunc <8 x i32> undef to <8 x i8>
217  %s8i8i64 = trunc <8 x i64> undef to <8 x i8>
218  %s8i16i32 = trunc <8 x i32> undef to <8 x i16>
219  %s8i16i64 = trunc <8 x i64> undef to <8 x i16>
220  %s8i32i64 = trunc <8 x i64> undef to <8 x i32>
221
222  %s16i8i16 = trunc <16 x i16> undef to <16 x i8>
223  %s16i8i32 = trunc <16 x i32> undef to <16 x i8>
224  %s16i8i64 = trunc <16 x i64> undef to <16 x i8>
225  %s16i16i32 = trunc <16 x i32> undef to <16 x i16>
226  %s16i16i64 = trunc <16 x i64> undef to <16 x i16>
227  %s16i32i64 = trunc <16 x i64> undef to <16 x i32>
228  ret void
229}
230
231define i32 @casts_no_users() {
232; CHECK-LABEL: 'casts_no_users'
233; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r30 = fptoui float undef to i1
234; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r31 = fptosi float undef to i1
235; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r32 = fptoui float undef to i8
236; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r33 = fptosi float undef to i8
237; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r34 = fptoui float undef to i16
238; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r35 = fptosi float undef to i16
239; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r36 = fptoui float undef to i32
240; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r37 = fptosi float undef to i32
241; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r38 = fptoui float undef to i64
242; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r39 = fptosi float undef to i64
243; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r40 = fptoui double undef to i1
244; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r41 = fptosi double undef to i1
245; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r42 = fptoui double undef to i8
246; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r43 = fptosi double undef to i8
247; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r44 = fptoui double undef to i16
248; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r45 = fptosi double undef to i16
249; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r46 = fptoui double undef to i32
250; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r47 = fptosi double undef to i32
251; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r48 = fptoui double undef to i64
252; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r49 = fptosi double undef to i64
253; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r50 = sitofp i1 undef to float
254; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r51 = uitofp i1 undef to float
255; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r52 = sitofp i1 undef to double
256; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r53 = uitofp i1 undef to double
257; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r54 = sitofp i8 undef to float
258; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r55 = uitofp i8 undef to float
259; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r56 = sitofp i8 undef to double
260; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r57 = uitofp i8 undef to double
261; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r58 = sitofp i16 undef to float
262; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r59 = uitofp i16 undef to float
263; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r60 = sitofp i16 undef to double
264; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r61 = uitofp i16 undef to double
265; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r62 = sitofp i32 undef to float
266; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r63 = uitofp i32 undef to float
267; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r64 = sitofp i32 undef to double
268; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r65 = uitofp i32 undef to double
269; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r66 = sitofp i64 undef to float
270; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r67 = uitofp i64 undef to float
271; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r68 = sitofp i64 undef to double
272; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r69 = uitofp i64 undef to double
273; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r80 = fptrunc double undef to float
274; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r81 = fptrunc <2 x double> undef to <2 x float>
275; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r82 = fptrunc <4 x double> undef to <4 x float>
276; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %r83 = fptrunc <8 x double> undef to <8 x float>
277; CHECK-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %r84 = fptrunc <16 x double> undef to <16 x float>
278; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r85 = fpext float undef to double
279; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r86 = fpext <2 x float> undef to <2 x double>
280; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r87 = fpext <4 x float> undef to <4 x double>
281; CHECK-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %r88 = fpext <8 x float> undef to <8 x double>
282; CHECK-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %r89 = fpext <16 x float> undef to <16 x double>
283; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r90 = fptoui <2 x float> undef to <2 x i1>
284; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r91 = fptosi <2 x float> undef to <2 x i1>
285; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r92 = fptoui <2 x float> undef to <2 x i8>
286; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r93 = fptosi <2 x float> undef to <2 x i8>
287; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r94 = fptoui <2 x float> undef to <2 x i16>
288; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r95 = fptosi <2 x float> undef to <2 x i16>
289; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r96 = fptoui <2 x float> undef to <2 x i32>
290; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r97 = fptosi <2 x float> undef to <2 x i32>
291; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r98 = fptoui <2 x float> undef to <2 x i64>
292; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r99 = fptosi <2 x float> undef to <2 x i64>
293; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r100 = fptoui <2 x double> undef to <2 x i1>
294; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r101 = fptosi <2 x double> undef to <2 x i1>
295; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r102 = fptoui <2 x double> undef to <2 x i8>
296; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r103 = fptosi <2 x double> undef to <2 x i8>
297; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r104 = fptoui <2 x double> undef to <2 x i16>
298; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r105 = fptosi <2 x double> undef to <2 x i16>
299; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r106 = fptoui <2 x double> undef to <2 x i32>
300; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r107 = fptosi <2 x double> undef to <2 x i32>
301; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r108 = fptoui <2 x double> undef to <2 x i64>
302; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r109 = fptosi <2 x double> undef to <2 x i64>
303; CHECK-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %r110 = fptoui <4 x float> undef to <4 x i1>
304; CHECK-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %r111 = fptosi <4 x float> undef to <4 x i1>
305; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r112 = fptoui <4 x float> undef to <4 x i8>
306; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r113 = fptosi <4 x float> undef to <4 x i8>
307; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r114 = fptoui <4 x float> undef to <4 x i16>
308; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r115 = fptosi <4 x float> undef to <4 x i16>
309; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r116 = fptoui <4 x float> undef to <4 x i32>
310; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r117 = fptosi <4 x float> undef to <4 x i32>
311; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r118 = fptoui <4 x float> undef to <4 x i64>
312; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r119 = fptosi <4 x float> undef to <4 x i64>
313; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %r120 = fptoui <4 x double> undef to <4 x i1>
314; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %r121 = fptosi <4 x double> undef to <4 x i1>
315; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r122 = fptoui <4 x double> undef to <4 x i8>
316; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r123 = fptosi <4 x double> undef to <4 x i8>
317; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r124 = fptoui <4 x double> undef to <4 x i16>
318; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r125 = fptosi <4 x double> undef to <4 x i16>
319; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r126 = fptoui <4 x double> undef to <4 x i32>
320; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r127 = fptosi <4 x double> undef to <4 x i32>
321; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r128 = fptoui <4 x double> undef to <4 x i64>
322; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r129 = fptosi <4 x double> undef to <4 x i64>
323; CHECK-NEXT:  Cost Model: Found an estimated cost of 45 for instruction: %r130 = fptoui <8 x float> undef to <8 x i1>
324; CHECK-NEXT:  Cost Model: Found an estimated cost of 45 for instruction: %r131 = fptosi <8 x float> undef to <8 x i1>
325; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r132 = fptoui <8 x float> undef to <8 x i8>
326; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r133 = fptosi <8 x float> undef to <8 x i8>
327; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r134 = fptoui <8 x float> undef to <8 x i16>
328; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r135 = fptosi <8 x float> undef to <8 x i16>
329; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r136 = fptoui <8 x float> undef to <8 x i32>
330; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r137 = fptosi <8 x float> undef to <8 x i32>
331; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r138 = fptoui <8 x float> undef to <8 x i64>
332; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r139 = fptosi <8 x float> undef to <8 x i64>
333; CHECK-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %r140 = fptoui <8 x double> undef to <8 x i1>
334; CHECK-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %r141 = fptosi <8 x double> undef to <8 x i1>
335; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %r142 = fptoui <8 x double> undef to <8 x i8>
336; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %r143 = fptosi <8 x double> undef to <8 x i8>
337; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %r144 = fptoui <8 x double> undef to <8 x i16>
338; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %r145 = fptosi <8 x double> undef to <8 x i16>
339; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r146 = fptoui <8 x double> undef to <8 x i32>
340; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r147 = fptosi <8 x double> undef to <8 x i32>
341; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r148 = fptoui <8 x double> undef to <8 x i64>
342; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r149 = fptosi <8 x double> undef to <8 x i64>
343; CHECK-NEXT:  Cost Model: Found an estimated cost of 91 for instruction: %r150 = fptoui <16 x float> undef to <16 x i1>
344; CHECK-NEXT:  Cost Model: Found an estimated cost of 91 for instruction: %r151 = fptosi <16 x float> undef to <16 x i1>
345; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %r152 = fptoui <16 x float> undef to <16 x i8>
346; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %r153 = fptosi <16 x float> undef to <16 x i8>
347; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r154 = fptoui <16 x float> undef to <16 x i16>
348; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r155 = fptosi <16 x float> undef to <16 x i16>
349; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r156 = fptoui <16 x float> undef to <16 x i32>
350; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r157 = fptosi <16 x float> undef to <16 x i32>
351; CHECK-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %r158 = fptoui <16 x float> undef to <16 x i64>
352; CHECK-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %r159 = fptosi <16 x float> undef to <16 x i64>
353; CHECK-NEXT:  Cost Model: Found an estimated cost of 71 for instruction: %r160 = fptoui <16 x double> undef to <16 x i1>
354; CHECK-NEXT:  Cost Model: Found an estimated cost of 71 for instruction: %r161 = fptosi <16 x double> undef to <16 x i1>
355; CHECK-NEXT:  Cost Model: Found an estimated cost of 23 for instruction: %r162 = fptoui <16 x double> undef to <16 x i8>
356; CHECK-NEXT:  Cost Model: Found an estimated cost of 23 for instruction: %r163 = fptosi <16 x double> undef to <16 x i8>
357; CHECK-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %r164 = fptoui <16 x double> undef to <16 x i16>
358; CHECK-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %r165 = fptosi <16 x double> undef to <16 x i16>
359; CHECK-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %r166 = fptoui <16 x double> undef to <16 x i32>
360; CHECK-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %r167 = fptosi <16 x double> undef to <16 x i32>
361; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r168 = fptoui <16 x double> undef to <16 x i64>
362; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r169 = fptosi <16 x double> undef to <16 x i64>
363; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r170 = uitofp <2 x i1> undef to <2 x float>
364; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r171 = sitofp <2 x i1> undef to <2 x float>
365; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r172 = uitofp <2 x i8> undef to <2 x float>
366; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r173 = sitofp <2 x i8> undef to <2 x float>
367; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r174 = uitofp <2 x i16> undef to <2 x float>
368; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r175 = sitofp <2 x i16> undef to <2 x float>
369; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r176 = uitofp <2 x i32> undef to <2 x float>
370; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r177 = sitofp <2 x i32> undef to <2 x float>
371; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r178 = uitofp <2 x i64> undef to <2 x float>
372; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r179 = sitofp <2 x i64> undef to <2 x float>
373; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r180 = uitofp <2 x i1> undef to <2 x double>
374; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r181 = sitofp <2 x i1> undef to <2 x double>
375; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r182 = uitofp <2 x i8> undef to <2 x double>
376; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r183 = sitofp <2 x i8> undef to <2 x double>
377; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r184 = uitofp <2 x i16> undef to <2 x double>
378; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r185 = sitofp <2 x i16> undef to <2 x double>
379; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r186 = uitofp <2 x i32> undef to <2 x double>
380; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r187 = sitofp <2 x i32> undef to <2 x double>
381; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r188 = uitofp <2 x i64> undef to <2 x double>
382; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r189 = sitofp <2 x i64> undef to <2 x double>
383; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r190 = uitofp <4 x i1> undef to <4 x float>
384; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r191 = sitofp <4 x i1> undef to <4 x float>
385; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r192 = uitofp <4 x i8> undef to <4 x float>
386; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r193 = sitofp <4 x i8> undef to <4 x float>
387; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r194 = uitofp <4 x i16> undef to <4 x float>
388; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r195 = sitofp <4 x i16> undef to <4 x float>
389; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r196 = uitofp <4 x i32> undef to <4 x float>
390; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r197 = sitofp <4 x i32> undef to <4 x float>
391; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r198 = uitofp <4 x i64> undef to <4 x float>
392; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r199 = sitofp <4 x i64> undef to <4 x float>
393; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r200 = uitofp <4 x i1> undef to <4 x double>
394; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r201 = sitofp <4 x i1> undef to <4 x double>
395; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %r202 = uitofp <4 x i8> undef to <4 x double>
396; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %r203 = sitofp <4 x i8> undef to <4 x double>
397; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %r204 = uitofp <4 x i16> undef to <4 x double>
398; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %r205 = sitofp <4 x i16> undef to <4 x double>
399; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r206 = uitofp <4 x i32> undef to <4 x double>
400; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %r207 = sitofp <4 x i32> undef to <4 x double>
401; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r208 = uitofp <4 x i64> undef to <4 x double>
402; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r209 = sitofp <4 x i64> undef to <4 x double>
403; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r210 = uitofp <8 x i1> undef to <8 x float>
404; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r211 = sitofp <8 x i1> undef to <8 x float>
405; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r212 = uitofp <8 x i8> undef to <8 x float>
406; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r213 = sitofp <8 x i8> undef to <8 x float>
407; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r214 = uitofp <8 x i16> undef to <8 x float>
408; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r215 = sitofp <8 x i16> undef to <8 x float>
409; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r216 = uitofp <8 x i32> undef to <8 x float>
410; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r217 = sitofp <8 x i32> undef to <8 x float>
411; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r218 = uitofp <8 x i64> undef to <8 x float>
412; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %r219 = sitofp <8 x i64> undef to <8 x float>
413; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %r220 = uitofp <8 x i1> undef to <8 x double>
414; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %r221 = sitofp <8 x i1> undef to <8 x double>
415; CHECK-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %r222 = uitofp <8 x i8> undef to <8 x double>
416; CHECK-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %r223 = sitofp <8 x i8> undef to <8 x double>
417; CHECK-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %r224 = uitofp <8 x i16> undef to <8 x double>
418; CHECK-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %r225 = sitofp <8 x i16> undef to <8 x double>
419; CHECK-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %r226 = uitofp <8 x i16> undef to <8 x double>
420; CHECK-NEXT:  Cost Model: Found an estimated cost of 19 for instruction: %r227 = sitofp <8 x i16> undef to <8 x double>
421; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r228 = uitofp <8 x i64> undef to <8 x double>
422; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r229 = sitofp <8 x i64> undef to <8 x double>
423; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %r230 = uitofp <16 x i1> undef to <16 x float>
424; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %r231 = sitofp <16 x i1> undef to <16 x float>
425; CHECK-NEXT:  Cost Model: Found an estimated cost of 21 for instruction: %r232 = uitofp <16 x i8> undef to <16 x float>
426; CHECK-NEXT:  Cost Model: Found an estimated cost of 21 for instruction: %r233 = sitofp <16 x i8> undef to <16 x float>
427; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r234 = uitofp <16 x i16> undef to <16 x float>
428; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r235 = sitofp <16 x i16> undef to <16 x float>
429; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r236 = uitofp <16 x i32> undef to <16 x float>
430; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r237 = sitofp <16 x i32> undef to <16 x float>
431; CHECK-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %r238 = uitofp <16 x i64> undef to <16 x float>
432; CHECK-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %r239 = sitofp <16 x i64> undef to <16 x float>
433; CHECK-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %r240 = uitofp <16 x i1> undef to <16 x double>
434; CHECK-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %r241 = sitofp <16 x i1> undef to <16 x double>
435; CHECK-NEXT:  Cost Model: Found an estimated cost of 39 for instruction: %r242 = uitofp <16 x i8> undef to <16 x double>
436; CHECK-NEXT:  Cost Model: Found an estimated cost of 39 for instruction: %r243 = sitofp <16 x i8> undef to <16 x double>
437; CHECK-NEXT:  Cost Model: Found an estimated cost of 38 for instruction: %r244 = uitofp <16 x i16> undef to <16 x double>
438; CHECK-NEXT:  Cost Model: Found an estimated cost of 38 for instruction: %r245 = sitofp <16 x i16> undef to <16 x double>
439; CHECK-NEXT:  Cost Model: Found an estimated cost of 38 for instruction: %r246 = uitofp <16 x i16> undef to <16 x double>
440; CHECK-NEXT:  Cost Model: Found an estimated cost of 38 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double>
441; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double>
442; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r249 = sitofp <16 x i64> undef to <16 x double>
443; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
444;
445  %r30 = fptoui float undef to i1
446  %r31 = fptosi float undef to i1
447  %r32 = fptoui float undef to i8
448  %r33 = fptosi float undef to i8
449  %r34 = fptoui float undef to i16
450  %r35 = fptosi float undef to i16
451  %r36 = fptoui float undef to i32
452  %r37 = fptosi float undef to i32
453  %r38 = fptoui float undef to i64
454  %r39 = fptosi float undef to i64
455  %r40 = fptoui double undef to i1
456  %r41 = fptosi double undef to i1
457  %r42 = fptoui double undef to i8
458  %r43 = fptosi double undef to i8
459  %r44 = fptoui double undef to i16
460  %r45 = fptosi double undef to i16
461  %r46 = fptoui double undef to i32
462  %r47 = fptosi double undef to i32
463  %r48 = fptoui double undef to i64
464  %r49 = fptosi double undef to i64
465  %r50 = sitofp i1 undef to float
466  %r51 = uitofp i1 undef to float
467  %r52 = sitofp i1 undef to double
468  %r53 = uitofp i1 undef to double
469  %r54 = sitofp i8 undef to float
470  %r55 = uitofp i8 undef to float
471  %r56 = sitofp i8 undef to double
472  %r57 = uitofp i8 undef to double
473  %r58 = sitofp i16 undef to float
474  %r59 = uitofp i16 undef to float
475  %r60 = sitofp i16 undef to double
476  %r61 = uitofp i16 undef to double
477  %r62 = sitofp i32 undef to float
478  %r63 = uitofp i32 undef to float
479  %r64 = sitofp i32 undef to double
480  %r65 = uitofp i32 undef to double
481  %r66 = sitofp i64 undef to float
482  %r67 = uitofp i64 undef to float
483  %r68 = sitofp i64 undef to double
484  %r69 = uitofp i64 undef to double
485  %r80 = fptrunc double undef to float
486  %r81 = fptrunc <2 x double> undef to <2 x float>
487  %r82 = fptrunc <4 x double> undef to <4 x float>
488  %r83 = fptrunc <8 x double> undef to <8 x float>
489  %r84 = fptrunc <16 x double> undef to <16 x float>
490  %r85 = fpext float undef to double
491  %r86 = fpext <2 x float> undef to <2 x double>
492  %r87 = fpext <4 x float> undef to <4 x double>
493  %r88 = fpext <8 x float> undef to <8 x double>
494  %r89 = fpext <16 x float> undef to <16 x double>
495  %r90 = fptoui <2 x float> undef to <2 x i1>
496  %r91 = fptosi <2 x float> undef to <2 x i1>
497  %r92 = fptoui <2 x float> undef to <2 x i8>
498  %r93 = fptosi <2 x float> undef to <2 x i8>
499  %r94 = fptoui <2 x float> undef to <2 x i16>
500  %r95 = fptosi <2 x float> undef to <2 x i16>
501  %r96 = fptoui <2 x float> undef to <2 x i32>
502  %r97 = fptosi <2 x float> undef to <2 x i32>
503  %r98 = fptoui <2 x float> undef to <2 x i64>
504  %r99 = fptosi <2 x float> undef to <2 x i64>
505  %r100 = fptoui <2 x double> undef to <2 x i1>
506  %r101 = fptosi <2 x double> undef to <2 x i1>
507  %r102 = fptoui <2 x double> undef to <2 x i8>
508  %r103 = fptosi <2 x double> undef to <2 x i8>
509  %r104 = fptoui <2 x double> undef to <2 x i16>
510  %r105 = fptosi <2 x double> undef to <2 x i16>
511  %r106 = fptoui <2 x double> undef to <2 x i32>
512  %r107 = fptosi <2 x double> undef to <2 x i32>
513  %r108 = fptoui <2 x double> undef to <2 x i64>
514  %r109 = fptosi <2 x double> undef to <2 x i64>
515
516  %r110 = fptoui <4 x float> undef to <4 x i1>
517  %r111 = fptosi <4 x float> undef to <4 x i1>
518  %r112 = fptoui <4 x float> undef to <4 x i8>
519  %r113 = fptosi <4 x float> undef to <4 x i8>
520  %r114 = fptoui <4 x float> undef to <4 x i16>
521  %r115 = fptosi <4 x float> undef to <4 x i16>
522  %r116 = fptoui <4 x float> undef to <4 x i32>
523  %r117 = fptosi <4 x float> undef to <4 x i32>
524  %r118 = fptoui <4 x float> undef to <4 x i64>
525  %r119 = fptosi <4 x float> undef to <4 x i64>
526
527  %r120 = fptoui <4 x double> undef to <4 x i1>
528  %r121 = fptosi <4 x double> undef to <4 x i1>
529  %r122 = fptoui <4 x double> undef to <4 x i8>
530  %r123 = fptosi <4 x double> undef to <4 x i8>
531  %r124 = fptoui <4 x double> undef to <4 x i16>
532  %r125 = fptosi <4 x double> undef to <4 x i16>
533  %r126 = fptoui <4 x double> undef to <4 x i32>
534  %r127 = fptosi <4 x double> undef to <4 x i32>
535  %r128 = fptoui <4 x double> undef to <4 x i64>
536  %r129 = fptosi <4 x double> undef to <4 x i64>
537
538  %r130 = fptoui <8 x float> undef to <8 x i1>
539  %r131 = fptosi <8 x float> undef to <8 x i1>
540  %r132 = fptoui <8 x float> undef to <8 x i8>
541  %r133 = fptosi <8 x float> undef to <8 x i8>
542  %r134 = fptoui <8 x float> undef to <8 x i16>
543  %r135 = fptosi <8 x float> undef to <8 x i16>
544  %r136 = fptoui <8 x float> undef to <8 x i32>
545  %r137 = fptosi <8 x float> undef to <8 x i32>
546  %r138 = fptoui <8 x float> undef to <8 x i64>
547  %r139 = fptosi <8 x float> undef to <8 x i64>
548
549  %r140 = fptoui <8 x double> undef to <8 x i1>
550  %r141 = fptosi <8 x double> undef to <8 x i1>
551  %r142 = fptoui <8 x double> undef to <8 x i8>
552  %r143 = fptosi <8 x double> undef to <8 x i8>
553  %r144 = fptoui <8 x double> undef to <8 x i16>
554  %r145 = fptosi <8 x double> undef to <8 x i16>
555  %r146 = fptoui <8 x double> undef to <8 x i32>
556  %r147 = fptosi <8 x double> undef to <8 x i32>
557  %r148 = fptoui <8 x double> undef to <8 x i64>
558  %r149 = fptosi <8 x double> undef to <8 x i64>
559
560  %r150 = fptoui <16 x float> undef to <16 x i1>
561  %r151 = fptosi <16 x float> undef to <16 x i1>
562  %r152 = fptoui <16 x float> undef to <16 x i8>
563  %r153 = fptosi <16 x float> undef to <16 x i8>
564  %r154 = fptoui <16 x float> undef to <16 x i16>
565  %r155 = fptosi <16 x float> undef to <16 x i16>
566  %r156 = fptoui <16 x float> undef to <16 x i32>
567  %r157 = fptosi <16 x float> undef to <16 x i32>
568  %r158 = fptoui <16 x float> undef to <16 x i64>
569  %r159 = fptosi <16 x float> undef to <16 x i64>
570
571  %r160 = fptoui <16 x double> undef to <16 x i1>
572  %r161 = fptosi <16 x double> undef to <16 x i1>
573  %r162 = fptoui <16 x double> undef to <16 x i8>
574  %r163 = fptosi <16 x double> undef to <16 x i8>
575  %r164 = fptoui <16 x double> undef to <16 x i16>
576  %r165 = fptosi <16 x double> undef to <16 x i16>
577  %r166 = fptoui <16 x double> undef to <16 x i32>
578  %r167 = fptosi <16 x double> undef to <16 x i32>
579  %r168 = fptoui <16 x double> undef to <16 x i64>
580  %r169 = fptosi <16 x double> undef to <16 x i64>
581
582  %r170 = uitofp <2 x i1> undef to <2 x float>
583  %r171 = sitofp <2 x i1> undef to <2 x float>
584  %r172 = uitofp <2 x i8> undef to <2 x float>
585  %r173 = sitofp <2 x i8> undef to <2 x float>
586  %r174 = uitofp <2 x i16> undef to <2 x float>
587  %r175 = sitofp <2 x i16> undef to <2 x float>
588  %r176 = uitofp <2 x i32> undef to <2 x float>
589  %r177 = sitofp <2 x i32> undef to <2 x float>
590  %r178 = uitofp <2 x i64> undef to <2 x float>
591  %r179 = sitofp <2 x i64> undef to <2 x float>
592
593  %r180 = uitofp <2 x i1> undef to <2 x double>
594  %r181 = sitofp <2 x i1> undef to <2 x double>
595  %r182 = uitofp <2 x i8> undef to <2 x double>
596  %r183 = sitofp <2 x i8> undef to <2 x double>
597  %r184 = uitofp <2 x i16> undef to <2 x double>
598  %r185 = sitofp <2 x i16> undef to <2 x double>
599  %r186 = uitofp <2 x i32> undef to <2 x double>
600  %r187 = sitofp <2 x i32> undef to <2 x double>
601  %r188 = uitofp <2 x i64> undef to <2 x double>
602  %r189 = sitofp <2 x i64> undef to <2 x double>
603
604  %r190 = uitofp <4 x i1> undef to <4 x float>
605  %r191 = sitofp <4 x i1> undef to <4 x float>
606  %r192 = uitofp <4 x i8> undef to <4 x float>
607  %r193 = sitofp <4 x i8> undef to <4 x float>
608  %r194 = uitofp <4 x i16> undef to <4 x float>
609  %r195 = sitofp <4 x i16> undef to <4 x float>
610  %r196 = uitofp <4 x i32> undef to <4 x float>
611  %r197 = sitofp <4 x i32> undef to <4 x float>
612  %r198 = uitofp <4 x i64> undef to <4 x float>
613  %r199 = sitofp <4 x i64> undef to <4 x float>
614
615  %r200 = uitofp <4 x i1> undef to <4 x double>
616  %r201 = sitofp <4 x i1> undef to <4 x double>
617  %r202 = uitofp <4 x i8> undef to <4 x double>
618  %r203 = sitofp <4 x i8> undef to <4 x double>
619  %r204 = uitofp <4 x i16> undef to <4 x double>
620  %r205 = sitofp <4 x i16> undef to <4 x double>
621  %r206 = uitofp <4 x i32> undef to <4 x double>
622  %r207 = sitofp <4 x i32> undef to <4 x double>
623  %r208 = uitofp <4 x i64> undef to <4 x double>
624  %r209 = sitofp <4 x i64> undef to <4 x double>
625
626  %r210 = uitofp <8 x i1> undef to <8 x float>
627  %r211 = sitofp <8 x i1> undef to <8 x float>
628  %r212 = uitofp <8 x i8> undef to <8 x float>
629  %r213 = sitofp <8 x i8> undef to <8 x float>
630  %r214 = uitofp <8 x i16> undef to <8 x float>
631  %r215 = sitofp <8 x i16> undef to <8 x float>
632  %r216 = uitofp <8 x i32> undef to <8 x float>
633  %r217 = sitofp <8 x i32> undef to <8 x float>
634  %r218 = uitofp <8 x i64> undef to <8 x float>
635  %r219 = sitofp <8 x i64> undef to <8 x float>
636
637  %r220 = uitofp <8 x i1> undef to <8 x double>
638  %r221 = sitofp <8 x i1> undef to <8 x double>
639  %r222 = uitofp <8 x i8> undef to <8 x double>
640  %r223 = sitofp <8 x i8> undef to <8 x double>
641  %r224 = uitofp <8 x i16> undef to <8 x double>
642  %r225 = sitofp <8 x i16> undef to <8 x double>
643  %r226 = uitofp <8 x i16> undef to <8 x double>
644  %r227 = sitofp <8 x i16> undef to <8 x double>
645  %r228 = uitofp <8 x i64> undef to <8 x double>
646  %r229 = sitofp <8 x i64> undef to <8 x double>
647
648  %r230 = uitofp <16 x i1> undef to <16 x float>
649  %r231 = sitofp <16 x i1> undef to <16 x float>
650  %r232 = uitofp <16 x i8> undef to <16 x float>
651  %r233 = sitofp <16 x i8> undef to <16 x float>
652  %r234 = uitofp <16 x i16> undef to <16 x float>
653  %r235 = sitofp <16 x i16> undef to <16 x float>
654  %r236 = uitofp <16 x i32> undef to <16 x float>
655  %r237 = sitofp <16 x i32> undef to <16 x float>
656  %r238 = uitofp <16 x i64> undef to <16 x float>
657  %r239 = sitofp <16 x i64> undef to <16 x float>
658
659  %r240 = uitofp <16 x i1> undef to <16 x double>
660  %r241 = sitofp <16 x i1> undef to <16 x double>
661  %r242 = uitofp <16 x i8> undef to <16 x double>
662  %r243 = sitofp <16 x i8> undef to <16 x double>
663  %r244 = uitofp <16 x i16> undef to <16 x double>
664  %r245 = sitofp <16 x i16> undef to <16 x double>
665  %r246 = uitofp <16 x i16> undef to <16 x double>
666  %r247 = sitofp <16 x i16> undef to <16 x double>
667  %r248 = uitofp <16 x i64> undef to <16 x double>
668  %r249 = sitofp <16 x i64> undef to <16 x double>
669
670  ret i32 undef
671}
672
673define i32 @casts_with_users(i8 %a, i16 %b, i32 %c, i64 %d, i1 %e) {
674; CHECK-LABEL: 'casts_with_users'
675; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r0 = sext i8 %a to i16
676; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r1 = sext i8 %a to i32
677; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r2 = sext i8 %a to i64
678; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r3 = sext i16 %b to i32
679; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r4 = sext i16 %b to i64
680; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r5 = sext i32 %c to i64
681; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i16 %r0, i16* undef, align 2
682; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i32 %r1, i32* undef, align 4
683; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i64 %r2, i64* undef, align 4
684; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i32 %r3, i32* undef, align 4
685; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i64 %r4, i64* undef, align 4
686; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i64 %r5, i64* undef, align 4
687; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r6 = zext i8 %a to i16
688; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r7 = zext i8 %a to i32
689; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r8 = zext i8 %a to i64
690; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r9 = zext i16 %b to i32
691; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r10 = zext i16 %b to i64
692; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r11 = zext i32 %c to i64
693; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i16 %r6, i16* undef, align 2
694; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i32 %r7, i32* undef, align 4
695; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i64 %r8, i64* undef, align 4
696; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i32 %r9, i32* undef, align 4
697; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i64 %r10, i64* undef, align 4
698; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i64 %r11, i64* undef, align 4
699; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r12 = trunc i64 %d to i32
700; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r13 = trunc i64 %d to i16
701; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r14 = trunc i64 %d to i8
702; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r15 = trunc i32 %c to i16
703; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r16 = trunc i32 %c to i8
704; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r17 = trunc i16 %b to i8
705; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %tie.trunc.8 = add i8 %r14, %r16
706; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %tie.trunc.8.1 = add i8 %tie.trunc.8, %r17
707; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %tie.trunc.16 = add i16 %r13, %r15
708; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %free.trunc.16.8 = trunc i16 %r6 to i8
709; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %free.trunc.32.8 = trunc i32 %r7 to i8
710; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %free.trunc.32.16 = trunc i32 %r9 to i16
711; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %free.trunc.64.8 = trunc i64 %r8 to i8
712; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %free.trunc.64.16 = trunc i64 %r10 to i16
713; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %free.trunc.64.32 = trunc i64 %r11 to i32
714; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r18 = sext i1 %e to i8
715; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r19 = sext i1 %e to i16
716; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r20 = sext i1 %e to i32
717; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r21 = sext i1 %e to i64
718; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r22 = zext i1 %e to i8
719; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r23 = zext i1 %e to i16
720; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r24 = zext i1 %e to i32
721; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r25 = zext i1 %e to i64
722; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i8 %r18, i8* undef, align 1
723; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i16 %r19, i16* undef, align 2
724; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i32 %r20, i32* undef, align 4
725; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i64 %r21, i64* undef, align 4
726; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i8 %r22, i8* undef, align 1
727; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i16 %r23, i16* undef, align 2
728; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i32 %r24, i32* undef, align 4
729; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i64 %r25, i64* undef, align 4
730; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r12
731;
732  %r0 = sext i8 %a to i16
733  %r1 = sext i8 %a to i32
734  %r2 = sext i8 %a to i64
735  %r3 = sext i16 %b to i32
736  %r4 = sext i16 %b to i64
737  %r5 = sext i32 %c to i64
738  store i16 %r0, i16* undef
739  store i32 %r1, i32* undef
740  store i64 %r2, i64* undef
741  store i32 %r3, i32* undef
742  store i64 %r4, i64* undef
743  store i64 %r5, i64* undef
744
745  %r6 = zext i8 %a to i16
746  %r7 = zext i8 %a to i32
747  %r8 = zext i8 %a to i64
748  %r9 = zext i16 %b to i32
749  %r10 = zext i16 %b to i64
750  %r11 = zext i32 %c to i64
751  store i16 %r6, i16* undef
752  store i32 %r7, i32* undef
753  store i64 %r8, i64* undef
754  store i32 %r9, i32* undef
755  store i64 %r10, i64* undef
756  store i64 %r11, i64* undef
757
758  %r12 = trunc i64 %d to i32
759  %r13 = trunc i64 %d to i16
760  %r14 = trunc i64 %d to i8
761  %r15 = trunc i32 %c to i16
762  %r16 = trunc i32 %c to i8
763  %r17 = trunc i16 %b to i8
764  %tie.trunc.8 = add i8 %r14, %r16
765  %tie.trunc.8.1 = add i8 %tie.trunc.8, %r17
766  %tie.trunc.16 = add i16 %r13, %r15
767
768  %free.trunc.16.8 = trunc i16 %r6 to i8
769  %free.trunc.32.8 = trunc i32 %r7 to i8
770  %free.trunc.32.16 = trunc i32 %r9 to i16
771  %free.trunc.64.8 = trunc i64 %r8 to i8
772  %free.trunc.64.16 = trunc i64 %r10 to i16
773  %free.trunc.64.32 = trunc i64 %r11 to i32
774
775  %r18 = sext i1 %e to i8
776  %r19 = sext i1 %e to i16
777  %r20 = sext i1 %e to i32
778  %r21 = sext i1 %e to i64
779  %r22 = zext i1 %e to i8
780  %r23 = zext i1 %e to i16
781  %r24 = zext i1 %e to i32
782  %r25 = zext i1 %e to i64
783  store i8 %r18, i8* undef
784  store i16 %r19, i16* undef
785  store i32 %r20, i32* undef
786  store i64 %r21, i64* undef
787  store i8 %r22, i8* undef
788  store i16 %r23, i16* undef
789  store i32 %r24, i32* undef
790  store i64 %r25, i64* undef
791  ret i32 %r12
792}
793
794define i32 @bitcasts() {
795; CHECK-LABEL: 'bitcasts'
796; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %a = bitcast i32 undef to i32
797; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %b = bitcast float undef to float
798; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %c = bitcast i32 undef to float
799; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %d = bitcast float undef to i32
800; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %e = bitcast i64 undef to double
801; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %f = bitcast double undef to i64
802; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %g = bitcast half undef to i16
803; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %h = bitcast i16 undef to half
804; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
805;
806  %a = bitcast i32 undef to i32
807  %b = bitcast float undef to float
808  %c = bitcast i32 undef to float
809  %d = bitcast float undef to i32
810  %e = bitcast i64 undef to double
811  %f = bitcast double undef to i64
812  %g = bitcast half undef to i16
813  %h = bitcast i16 undef to half
814  ret i32 undef
815}
816
817define i32 @load_extends() #0 {
818; CHECK-LABEL: 'load_extends'
819; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadi8 = load i8, i8* undef, align 1
820; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadi16 = load i16, i16* undef, align 2
821; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadi32 = load i32, i32* undef, align 4
822; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %loadv2i8 = load <2 x i8>, <2 x i8>* undef, align 2
823; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %loadv4i8 = load <4 x i8>, <4 x i8>* undef, align 4
824; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadv8i8 = load <8 x i8>, <8 x i8>* undef, align 8
825; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %loadv2i16 = load <2 x i16>, <2 x i16>* undef, align 4
826; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadv4i16 = load <4 x i16>, <4 x i16>* undef, align 8
827; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadv2i32 = load <2 x i32>, <2 x i32>* undef, align 8
828; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadv4i32 = load <4 x i32>, <4 x i32>* undef, align 16
829; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadnxv2i32 = load <vscale x 2 x i32>, <vscale x 2 x i32>* undef, align 8
830; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %loadnxv4i32 = load <vscale x 4 x i32>, <vscale x 4 x i32>* undef, align 16
831; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r0 = sext i8 %loadi8 to i16
832; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r1 = zext i8 %loadi8 to i16
833; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r2 = sext i8 %loadi8 to i32
834; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r3 = zext i8 %loadi8 to i32
835; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r4 = sext i8 %loadi8 to i64
836; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r5 = zext i8 %loadi8 to i64
837; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r6 = sext i16 %loadi16 to i32
838; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r7 = zext i16 %loadi16 to i32
839; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r8 = sext i16 %loadi16 to i64
840; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r9 = zext i16 %loadi16 to i64
841; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r10 = sext i32 %loadi32 to i64
842; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r11 = zext i32 %loadi32 to i64
843; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v0 = sext <8 x i8> %loadv8i8 to <8 x i16>
844; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v1 = zext <8 x i8> %loadv8i8 to <8 x i16>
845; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2 = sext <4 x i8> %loadv4i8 to <4 x i32>
846; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v3 = zext <4 x i8> %loadv4i8 to <4 x i32>
847; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v4 = sext <2 x i8> %loadv2i8 to <2 x i64>
848; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v5 = zext <2 x i8> %loadv2i8 to <2 x i64>
849; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v6 = sext <4 x i16> %loadv4i16 to <4 x i32>
850; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v7 = zext <4 x i16> %loadv4i16 to <4 x i32>
851; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v8 = sext <2 x i16> %loadv2i16 to <2 x i64>
852; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64>
853; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64>
854; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64>
855; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v12 = sext <4 x i32> %loadv4i32 to <4 x i64>
856; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v13 = zext <4 x i32> %loadv4i32 to <4 x i64>
857; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v14 = sext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
858; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v15 = zext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
859; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v16 = sext <vscale x 4 x i32> %loadnxv4i32 to <vscale x 4 x i64>
860; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v17 = zext <vscale x 4 x i32> %loadnxv4i32 to <vscale x 4 x i64>
861; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
862;
863  %loadi8 = load i8, i8* undef
864  %loadi16 = load i16, i16* undef
865  %loadi32 = load i32, i32* undef
866  %loadv2i8 = load <2 x i8>, <2 x i8>* undef
867  %loadv4i8 = load <4 x i8>, <4 x i8>* undef
868  %loadv8i8 = load <8 x i8>, <8 x i8>* undef
869  %loadv2i16 = load <2 x i16>, <2 x i16>* undef
870  %loadv4i16 = load <4 x i16>, <4 x i16>* undef
871  %loadv2i32 = load <2 x i32>, <2 x i32>* undef
872  %loadv4i32 = load <4 x i32>, <4 x i32>* undef
873  %loadnxv2i32 = load <vscale x 2 x i32>, <vscale x 2 x i32>* undef
874  %loadnxv4i32 = load <vscale x 4 x i32>, <vscale x 4 x i32>* undef
875
876  %r0 = sext i8 %loadi8 to i16
877  %r1 = zext i8 %loadi8 to i16
878  %r2 = sext i8 %loadi8 to i32
879  %r3 = zext i8 %loadi8 to i32
880  %r4 = sext i8 %loadi8 to i64
881  %r5 = zext i8 %loadi8 to i64
882  %r6 = sext i16 %loadi16 to i32
883  %r7 = zext i16 %loadi16 to i32
884  %r8 = sext i16 %loadi16 to i64
885  %r9 = zext i16 %loadi16 to i64
886  %r10 = sext i32 %loadi32 to i64
887  %r11 = zext i32 %loadi32 to i64
888
889  %v0 = sext <8 x i8> %loadv8i8 to <8 x i16>
890  %v1 = zext <8 x i8> %loadv8i8 to <8 x i16>
891  %v2 = sext <4 x i8> %loadv4i8 to <4 x i32>
892  %v3 = zext <4 x i8> %loadv4i8 to <4 x i32>
893  %v4 = sext <2 x i8> %loadv2i8 to <2 x i64>
894  %v5 = zext <2 x i8> %loadv2i8 to <2 x i64>
895  %v6 = sext <4 x i16> %loadv4i16 to <4 x i32>
896  %v7 = zext <4 x i16> %loadv4i16 to <4 x i32>
897  %v8 = sext <2 x i16> %loadv2i16 to <2 x i64>
898  %v9 = zext <2 x i16> %loadv2i16 to <2 x i64>
899  %v10 = sext <2 x i32> %loadv2i32 to <2 x i64>
900  %v11 = zext <2 x i32> %loadv2i32 to <2 x i64>
901  %v12 = sext <4 x i32> %loadv4i32 to <4 x i64>
902  %v13 = zext <4 x i32> %loadv4i32 to <4 x i64>
903  %v14 = sext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
904  %v15 = zext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
905  %v16 = sext <vscale x 4 x i32> %loadnxv4i32 to <vscale x 4 x i64>
906  %v17 = zext <vscale x 4 x i32> %loadnxv4i32 to <vscale x 4 x i64>
907
908  ret i32 undef
909}
910
911define i32 @store_truncs() {
912; CHECK-LABEL: 'store_truncs'
913; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r0 = trunc i64 undef to i8
914; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i8 %r0, i8* undef, align 1
915; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r1 = trunc i64 undef to i16
916; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i16 %r1, i16* undef, align 2
917; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r2 = trunc i64 undef to i32
918; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i32 %r2, i32* undef, align 4
919; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r3 = trunc i32 undef to i8
920; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i8 %r3, i8* undef, align 1
921; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r4 = trunc i32 undef to i16
922; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i16 %r4, i16* undef, align 2
923; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %r5 = trunc i16 undef to i8
924; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store i8 %r5, i8* undef, align 1
925; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
926;
927  %r0 = trunc i64 undef to i8
928  store i8 %r0, i8* undef
929  %r1 = trunc i64 undef to i16
930  store i16 %r1, i16* undef
931  %r2 = trunc i64 undef to i32
932  store i32 %r2, i32* undef
933  %r3 = trunc i32 undef to i8
934  store i8 %r3, i8* undef
935  %r4 = trunc i32 undef to i16
936  store i16 %r4, i16* undef
937  %r5 = trunc i16 undef to i8
938  store i8 %r5, i8* undef
939  ret i32 undef
940}
941
942define void @extend_extract() {
943; CHECK-LABEL: 'extend_extract'
944; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %e8 = extractelement <8 x i8> undef, i32 1
945; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %e16 = extractelement <8 x i16> undef, i32 1
946; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %e32 = extractelement <8 x i32> undef, i32 1
947; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s8_16 = sext i8 %e8 to i16
948; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z8_16 = zext i8 %e8 to i16
949; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s8_32 = sext i8 %e8 to i32
950; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z8_32 = zext i8 %e8 to i32
951; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s8_64 = sext i8 %e8 to i64
952; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %z8_64 = zext i8 %e8 to i64
953; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s16_32 = sext i16 %e16 to i32
954; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %z16_32 = zext i16 %e16 to i32
955; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s16_64 = sext i16 %e16 to i64
956; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %z16_64 = zext i16 %e16 to i64
957; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %s32_64 = sext i32 %e32 to i64
958; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %z32_64 = zext i32 %e32 to i64
959; CHECK-NEXT:  Cost Model: Found an estimated cost of 13 for instruction: call void @use(i16 %s8_16, i16 %z8_16, i32 %s8_32, i32 %z8_32, i64 %s8_64, i64 %z8_64, i32 %s16_32, i32 %z16_32, i64 %s16_64, i64 %z16_64, i64 %s32_64, i64 %z32_64)
960; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
961;
962  %e8 = extractelement <8 x i8> undef, i32 1
963  %e16 = extractelement <8 x i16> undef, i32 1
964  %e32 = extractelement <8 x i32> undef, i32 1
965  %s8_16 = sext i8 %e8 to i16
966  %z8_16 = zext i8 %e8 to i16
967  %s8_32 = sext i8 %e8 to i32
968  %z8_32 = zext i8 %e8 to i32
969  %s8_64 = sext i8 %e8 to i64
970  %z8_64 = zext i8 %e8 to i64
971  %s16_32 = sext i16 %e16 to i32
972  %z16_32 = zext i16 %e16 to i32
973  %s16_64 = sext i16 %e16 to i64
974  %z16_64 = zext i16 %e16 to i64
975  %s32_64 = sext i32 %e32 to i64
976  %z32_64 = zext i32 %e32 to i64
977  call void @use(i16 %s8_16, i16 %z8_16, i32 %s8_32, i32 %z8_32, i64 %s8_64, i64 %z8_64, i32 %s16_32, i32 %z16_32, i64 %s16_64, i64 %z16_64, i64 %s32_64, i64 %z32_64)
978  ret void
979}
980
981declare void @use(i16, i16, i32, i32, i64, i64, i32, i32, i64, i64, i64, i64)
982
983define void @fp16cast() {
984; CHECK-NOFP16-LABEL: 'fp16cast'
985; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r30 = fptoui half undef to i1
986; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r31 = fptosi half undef to i1
987; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r32 = fptoui half undef to i8
988; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r33 = fptosi half undef to i8
989; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r34 = fptoui half undef to i16
990; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r35 = fptosi half undef to i16
991; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r36 = fptoui half undef to i32
992; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r37 = fptosi half undef to i32
993; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r38 = fptoui half undef to i64
994; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r39 = fptosi half undef to i64
995; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r90 = fptoui <2 x half> undef to <2 x i1>
996; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r91 = fptosi <2 x half> undef to <2 x i1>
997; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r92 = fptoui <2 x half> undef to <2 x i8>
998; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r93 = fptosi <2 x half> undef to <2 x i8>
999; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r94 = fptoui <2 x half> undef to <2 x i16>
1000; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r95 = fptosi <2 x half> undef to <2 x i16>
1001; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r96 = fptoui <2 x half> undef to <2 x i32>
1002; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r97 = fptosi <2 x half> undef to <2 x i32>
1003; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r98 = fptoui <2 x half> undef to <2 x i64>
1004; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r99 = fptosi <2 x half> undef to <2 x i64>
1005; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r110 = fptoui <4 x half> undef to <4 x i1>
1006; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r111 = fptosi <4 x half> undef to <4 x i1>
1007; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r112 = fptoui <4 x half> undef to <4 x i8>
1008; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r113 = fptosi <4 x half> undef to <4 x i8>
1009; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r114 = fptoui <4 x half> undef to <4 x i16>
1010; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r115 = fptosi <4 x half> undef to <4 x i16>
1011; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %r116 = fptoui <4 x half> undef to <4 x i32>
1012; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %r117 = fptosi <4 x half> undef to <4 x i32>
1013; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %r118 = fptoui <4 x half> undef to <4 x i64>
1014; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %r119 = fptosi <4 x half> undef to <4 x i64>
1015; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %r130 = fptoui <8 x half> undef to <8 x i1>
1016; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %r131 = fptosi <8 x half> undef to <8 x i1>
1017; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %r132 = fptoui <8 x half> undef to <8 x i8>
1018; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %r133 = fptosi <8 x half> undef to <8 x i8>
1019; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r134 = fptoui <8 x half> undef to <8 x i16>
1020; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r135 = fptosi <8 x half> undef to <8 x i16>
1021; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 45 for instruction: %r136 = fptoui <8 x half> undef to <8 x i32>
1022; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 45 for instruction: %r137 = fptosi <8 x half> undef to <8 x i32>
1023; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %r138 = fptoui <8 x half> undef to <8 x i64>
1024; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %r139 = fptosi <8 x half> undef to <8 x i64>
1025; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 101 for instruction: %r150 = fptoui <16 x half> undef to <16 x i1>
1026; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 101 for instruction: %r151 = fptosi <16 x half> undef to <16 x i1>
1027; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 101 for instruction: %r152 = fptoui <16 x half> undef to <16 x i8>
1028; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 101 for instruction: %r153 = fptosi <16 x half> undef to <16 x i8>
1029; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r154 = fptoui <16 x half> undef to <16 x i16>
1030; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r155 = fptosi <16 x half> undef to <16 x i16>
1031; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 90 for instruction: %r156 = fptoui <16 x half> undef to <16 x i32>
1032; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 90 for instruction: %r157 = fptosi <16 x half> undef to <16 x i32>
1033; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 70 for instruction: %r158 = fptoui <16 x half> undef to <16 x i64>
1034; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 70 for instruction: %r159 = fptosi <16 x half> undef to <16 x i64>
1035; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r250 = uitofp <8 x i1> undef to <8 x half>
1036; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r251 = sitofp <8 x i1> undef to <8 x half>
1037; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r252 = uitofp <8 x i8> undef to <8 x half>
1038; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r253 = sitofp <8 x i8> undef to <8 x half>
1039; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r254 = uitofp <8 x i16> undef to <8 x half>
1040; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r255 = sitofp <8 x i16> undef to <8 x half>
1041; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r256 = uitofp <8 x i32> undef to <8 x half>
1042; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r257 = sitofp <8 x i32> undef to <8 x half>
1043; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %r258 = uitofp <8 x i64> undef to <8 x half>
1044; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %r259 = sitofp <8 x i64> undef to <8 x half>
1045; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r260 = uitofp <16 x i1> undef to <16 x half>
1046; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r261 = sitofp <16 x i1> undef to <16 x half>
1047; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r262 = uitofp <16 x i8> undef to <16 x half>
1048; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r263 = sitofp <16 x i8> undef to <16 x half>
1049; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r264 = uitofp <16 x i16> undef to <16 x half>
1050; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r265 = sitofp <16 x i16> undef to <16 x half>
1051; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %r266 = uitofp <16 x i32> undef to <16 x half>
1052; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %r267 = sitofp <16 x i32> undef to <16 x half>
1053; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %r268 = uitofp <16 x i64> undef to <16 x half>
1054; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %r269 = sitofp <16 x i64> undef to <16 x half>
1055; CHECK-NOFP16-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1056;
1057; CHECK-FP16-LABEL: 'fp16cast'
1058; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r30 = fptoui half undef to i1
1059; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r31 = fptosi half undef to i1
1060; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r32 = fptoui half undef to i8
1061; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r33 = fptosi half undef to i8
1062; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r34 = fptoui half undef to i16
1063; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r35 = fptosi half undef to i16
1064; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r36 = fptoui half undef to i32
1065; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r37 = fptosi half undef to i32
1066; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r38 = fptoui half undef to i64
1067; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r39 = fptosi half undef to i64
1068; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r90 = fptoui <2 x half> undef to <2 x i1>
1069; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r91 = fptosi <2 x half> undef to <2 x i1>
1070; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r92 = fptoui <2 x half> undef to <2 x i8>
1071; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r93 = fptosi <2 x half> undef to <2 x i8>
1072; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r94 = fptoui <2 x half> undef to <2 x i16>
1073; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r95 = fptosi <2 x half> undef to <2 x i16>
1074; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r96 = fptoui <2 x half> undef to <2 x i32>
1075; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r97 = fptosi <2 x half> undef to <2 x i32>
1076; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r98 = fptoui <2 x half> undef to <2 x i64>
1077; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r99 = fptosi <2 x half> undef to <2 x i64>
1078; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r110 = fptoui <4 x half> undef to <4 x i1>
1079; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r111 = fptosi <4 x half> undef to <4 x i1>
1080; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r112 = fptoui <4 x half> undef to <4 x i8>
1081; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r113 = fptosi <4 x half> undef to <4 x i8>
1082; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r114 = fptoui <4 x half> undef to <4 x i16>
1083; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r115 = fptosi <4 x half> undef to <4 x i16>
1084; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r116 = fptoui <4 x half> undef to <4 x i32>
1085; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r117 = fptosi <4 x half> undef to <4 x i32>
1086; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %r118 = fptoui <4 x half> undef to <4 x i64>
1087; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %r119 = fptosi <4 x half> undef to <4 x i64>
1088; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %r130 = fptoui <8 x half> undef to <8 x i1>
1089; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 50 for instruction: %r131 = fptosi <8 x half> undef to <8 x i1>
1090; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r132 = fptoui <8 x half> undef to <8 x i8>
1091; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r133 = fptosi <8 x half> undef to <8 x i8>
1092; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r134 = fptoui <8 x half> undef to <8 x i16>
1093; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r135 = fptosi <8 x half> undef to <8 x i16>
1094; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r136 = fptoui <8 x half> undef to <8 x i32>
1095; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r137 = fptosi <8 x half> undef to <8 x i32>
1096; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %r138 = fptoui <8 x half> undef to <8 x i64>
1097; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %r139 = fptosi <8 x half> undef to <8 x i64>
1098; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 101 for instruction: %r150 = fptoui <16 x half> undef to <16 x i1>
1099; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 101 for instruction: %r151 = fptosi <16 x half> undef to <16 x i1>
1100; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r152 = fptoui <16 x half> undef to <16 x i8>
1101; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r153 = fptosi <16 x half> undef to <16 x i8>
1102; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r154 = fptoui <16 x half> undef to <16 x i16>
1103; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r155 = fptosi <16 x half> undef to <16 x i16>
1104; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r156 = fptoui <16 x half> undef to <16 x i32>
1105; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %r157 = fptosi <16 x half> undef to <16 x i32>
1106; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 70 for instruction: %r158 = fptoui <16 x half> undef to <16 x i64>
1107; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 70 for instruction: %r159 = fptosi <16 x half> undef to <16 x i64>
1108; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r250 = uitofp <8 x i1> undef to <8 x half>
1109; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r251 = sitofp <8 x i1> undef to <8 x half>
1110; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r252 = uitofp <8 x i8> undef to <8 x half>
1111; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r253 = sitofp <8 x i8> undef to <8 x half>
1112; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r254 = uitofp <8 x i16> undef to <8 x half>
1113; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r255 = sitofp <8 x i16> undef to <8 x half>
1114; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r256 = uitofp <8 x i32> undef to <8 x half>
1115; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r257 = sitofp <8 x i32> undef to <8 x half>
1116; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %r258 = uitofp <8 x i64> undef to <8 x half>
1117; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %r259 = sitofp <8 x i64> undef to <8 x half>
1118; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r260 = uitofp <16 x i1> undef to <16 x half>
1119; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %r261 = sitofp <16 x i1> undef to <16 x half>
1120; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r262 = uitofp <16 x i8> undef to <16 x half>
1121; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r263 = sitofp <16 x i8> undef to <16 x half>
1122; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r264 = uitofp <16 x i16> undef to <16 x half>
1123; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %r265 = sitofp <16 x i16> undef to <16 x half>
1124; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %r266 = uitofp <16 x i32> undef to <16 x half>
1125; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %r267 = sitofp <16 x i32> undef to <16 x half>
1126; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %r268 = uitofp <16 x i64> undef to <16 x half>
1127; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %r269 = sitofp <16 x i64> undef to <16 x half>
1128; CHECK-FP16-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
1129;
1130  %r30 = fptoui half undef to i1
1131  %r31 = fptosi half undef to i1
1132  %r32 = fptoui half undef to i8
1133  %r33 = fptosi half undef to i8
1134  %r34 = fptoui half undef to i16
1135  %r35 = fptosi half undef to i16
1136  %r36 = fptoui half undef to i32
1137  %r37 = fptosi half undef to i32
1138  %r38 = fptoui half undef to i64
1139  %r39 = fptosi half undef to i64
1140
1141  %r90 = fptoui <2 x half> undef to <2 x i1>
1142  %r91 = fptosi <2 x half> undef to <2 x i1>
1143  %r92 = fptoui <2 x half> undef to <2 x i8>
1144  %r93 = fptosi <2 x half> undef to <2 x i8>
1145  %r94 = fptoui <2 x half> undef to <2 x i16>
1146  %r95 = fptosi <2 x half> undef to <2 x i16>
1147  %r96 = fptoui <2 x half> undef to <2 x i32>
1148  %r97 = fptosi <2 x half> undef to <2 x i32>
1149  %r98 = fptoui <2 x half> undef to <2 x i64>
1150  %r99 = fptosi <2 x half> undef to <2 x i64>
1151
1152  %r110 = fptoui <4 x half> undef to <4 x i1>
1153  %r111 = fptosi <4 x half> undef to <4 x i1>
1154  %r112 = fptoui <4 x half> undef to <4 x i8>
1155  %r113 = fptosi <4 x half> undef to <4 x i8>
1156  %r114 = fptoui <4 x half> undef to <4 x i16>
1157  %r115 = fptosi <4 x half> undef to <4 x i16>
1158  %r116 = fptoui <4 x half> undef to <4 x i32>
1159  %r117 = fptosi <4 x half> undef to <4 x i32>
1160  %r118 = fptoui <4 x half> undef to <4 x i64>
1161  %r119 = fptosi <4 x half> undef to <4 x i64>
1162
1163  %r130 = fptoui <8 x half> undef to <8 x i1>
1164  %r131 = fptosi <8 x half> undef to <8 x i1>
1165  %r132 = fptoui <8 x half> undef to <8 x i8>
1166  %r133 = fptosi <8 x half> undef to <8 x i8>
1167  %r134 = fptoui <8 x half> undef to <8 x i16>
1168  %r135 = fptosi <8 x half> undef to <8 x i16>
1169  %r136 = fptoui <8 x half> undef to <8 x i32>
1170  %r137 = fptosi <8 x half> undef to <8 x i32>
1171  %r138 = fptoui <8 x half> undef to <8 x i64>
1172  %r139 = fptosi <8 x half> undef to <8 x i64>
1173
1174  %r150 = fptoui <16 x half> undef to <16 x i1>
1175  %r151 = fptosi <16 x half> undef to <16 x i1>
1176  %r152 = fptoui <16 x half> undef to <16 x i8>
1177  %r153 = fptosi <16 x half> undef to <16 x i8>
1178  %r154 = fptoui <16 x half> undef to <16 x i16>
1179  %r155 = fptosi <16 x half> undef to <16 x i16>
1180  %r156 = fptoui <16 x half> undef to <16 x i32>
1181  %r157 = fptosi <16 x half> undef to <16 x i32>
1182  %r158 = fptoui <16 x half> undef to <16 x i64>
1183  %r159 = fptosi <16 x half> undef to <16 x i64>
1184
1185  %r250 = uitofp <8 x i1> undef to <8 x half>
1186  %r251 = sitofp <8 x i1> undef to <8 x half>
1187  %r252 = uitofp <8 x i8> undef to <8 x half>
1188  %r253 = sitofp <8 x i8> undef to <8 x half>
1189  %r254 = uitofp <8 x i16> undef to <8 x half>
1190  %r255 = sitofp <8 x i16> undef to <8 x half>
1191  %r256 = uitofp <8 x i32> undef to <8 x half>
1192  %r257 = sitofp <8 x i32> undef to <8 x half>
1193  %r258 = uitofp <8 x i64> undef to <8 x half>
1194  %r259 = sitofp <8 x i64> undef to <8 x half>
1195
1196  %r260 = uitofp <16 x i1> undef to <16 x half>
1197  %r261 = sitofp <16 x i1> undef to <16 x half>
1198  %r262 = uitofp <16 x i8> undef to <16 x half>
1199  %r263 = sitofp <16 x i8> undef to <16 x half>
1200  %r264 = uitofp <16 x i16> undef to <16 x half>
1201  %r265 = sitofp <16 x i16> undef to <16 x half>
1202  %r266 = uitofp <16 x i32> undef to <16 x half>
1203  %r267 = sitofp <16 x i32> undef to <16 x half>
1204  %r268 = uitofp <16 x i64> undef to <16 x half>
1205  %r269 = sitofp <16 x i64> undef to <16 x half>
1206  ret void
1207}
1208
1209attributes #0 = { "target-features"="+sve" }
1210