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