• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s  -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=cortex-a8 | FileCheck %s
2target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
3target triple = "thumbv7-apple-ios6.0.0"
4
5define i32 @casts() {
6
7    ; -- scalars --
8  ; CHECK: Found an estimated cost of 1 for instruction:   %r0 = sext i1 undef to i8
9  %r0 = sext i1 undef to i8
10  ; CHECK: Found an estimated cost of 1 for instruction:   %r1 = zext i1 undef to i8
11  %r1 = zext i1 undef to i8
12  ; CHECK: Found an estimated cost of 1 for instruction:   %r2 = sext i1 undef to i16
13  %r2 = sext i1 undef to i16
14  ; CHECK: Found an estimated cost of 1 for instruction:   %r3 = zext i1 undef to i16
15  %r3 = zext i1 undef to i16
16  ; CHECK: Found an estimated cost of 1 for instruction:   %r4 = sext i1 undef to i32
17  %r4 = sext i1 undef to i32
18  ; CHECK: Found an estimated cost of 1 for instruction:   %r5 = zext i1 undef to i32
19  %r5 = zext i1 undef to i32
20  ; CHECK: Found an estimated cost of 1 for instruction:   %r6 = sext i1 undef to i64
21  %r6 = sext i1 undef to i64
22  ; CHECK: Found an estimated cost of 1 for instruction:   %r7 = zext i1 undef to i64
23  %r7 = zext i1 undef to i64
24  ; CHECK: Found an estimated cost of 0 for instruction:   %r8 = trunc i8 undef to i1
25  %r8 = trunc i8 undef to i1
26  ; CHECK: Found an estimated cost of 1 for instruction:   %r9 = sext i8 undef to i16
27  %r9 = sext i8 undef to i16
28  ; CHECK: Found an estimated cost of 1 for instruction:   %r10 = zext i8 undef to i16
29  %r10 = zext i8 undef to i16
30  ; CHECK: Found an estimated cost of 1 for instruction:   %r11 = sext i8 undef to i32
31  %r11 = sext i8 undef to i32
32  ; CHECK: Found an estimated cost of 1 for instruction:   %r12 = zext i8 undef to i32
33  %r12 = zext i8 undef to i32
34  ; CHECK: Found an estimated cost of 1 for instruction:   %r13 = sext i8 undef to i64
35  %r13 = sext i8 undef to i64
36  ; CHECK: Found an estimated cost of 1 for instruction:   %r14 = zext i8 undef to i64
37  %r14 = zext i8 undef to i64
38  ; CHECK: Found an estimated cost of 0 for instruction:   %r15 = trunc i16 undef to i1
39  %r15 = trunc i16 undef to i1
40  ; CHECK: Found an estimated cost of 0 for instruction:   %r16 = trunc i16 undef to i8
41  %r16 = trunc i16 undef to i8
42  ; CHECK: Found an estimated cost of 1 for instruction:   %r17 = sext i16 undef to i32
43  %r17 = sext i16 undef to i32
44  ; CHECK: Found an estimated cost of 1 for instruction:   %r18 = zext i16 undef to i32
45  %r18 = zext i16 undef to i32
46  ; CHECK: Found an estimated cost of 2 for instruction:   %r19 = sext i16 undef to i64
47  %r19 = sext i16 undef to i64
48  ; CHECK: Found an estimated cost of 1 for instruction:   %r20 = zext i16 undef to i64
49  %r20 = zext i16 undef to i64
50  ; CHECK: Found an estimated cost of 0 for instruction:   %r21 = trunc i32 undef to i1
51  %r21 = trunc i32 undef to i1
52  ; CHECK: Found an estimated cost of 0 for instruction:   %r22 = trunc i32 undef to i8
53  %r22 = trunc i32 undef to i8
54  ; CHECK: Found an estimated cost of 0 for instruction:   %r23 = trunc i32 undef to i16
55  %r23 = trunc i32 undef to i16
56  ; CHECK: Found an estimated cost of 1 for instruction:   %r24 = sext i32 undef to i64
57  %r24 = sext i32 undef to i64
58  ; CHECK: Found an estimated cost of 1 for instruction:   %r25 = zext i32 undef to i64
59  %r25 = zext i32 undef to i64
60  ; CHECK: Found an estimated cost of 0 for instruction:   %r26 = trunc i64 undef to i1
61  %r26 = trunc i64 undef to i1
62  ; CHECK: Found an estimated cost of 0 for instruction:   %r27 = trunc i64 undef to i8
63  %r27 = trunc i64 undef to i8
64  ; CHECK: Found an estimated cost of 0 for instruction:   %r28 = trunc i64 undef to i16
65  %r28 = trunc i64 undef to i16
66  ; CHECK: Found an estimated cost of 0 for instruction:   %r29 = trunc i64 undef to i32
67  %r29 = trunc i64 undef to i32
68
69    ; -- floating point conversions --
70  ; Moves between scalar and NEON registers.
71  ; CHECK: Found an estimated cost of 2 for instruction:   %r30 = fptoui float undef to i1
72  %r30 = fptoui float undef to i1
73  ; CHECK: Found an estimated cost of 2 for instruction:   %r31 = fptosi float undef to i1
74  %r31 = fptosi float undef to i1
75  ; CHECK: Found an estimated cost of 2 for instruction:   %r32 = fptoui float undef to i8
76  %r32 = fptoui float undef to i8
77  ; CHECK: Found an estimated cost of 2 for instruction:   %r33 = fptosi float undef to i8
78  %r33 = fptosi float undef to i8
79  ; CHECK:  Found an estimated cost of 2 for instruction:   %r34 = fptoui float undef to i16
80  %r34 = fptoui float undef to i16
81  ; CHECK:  Found an estimated cost of 2 for instruction:   %r35 = fptosi float undef to i16
82  %r35 = fptosi float undef to i16
83  ; CHECK:  Found an estimated cost of 2 for instruction:   %r36 = fptoui float undef to i32
84  %r36 = fptoui float undef to i32
85  ; CHECK:  Found an estimated cost of 2 for instruction:   %r37 = fptosi float undef to i32
86  %r37 = fptosi float undef to i32
87  ; CHECK:  Found an estimated cost of 10 for instruction:   %r38 = fptoui float undef to i64
88  %r38 = fptoui float undef to i64
89  ; CHECK:  Found an estimated cost of 10 for instruction:   %r39 = fptosi float undef to i64
90  %r39 = fptosi float undef to i64
91  ; CHECK:  Found an estimated cost of 2 for instruction:   %r40 = fptoui double undef to i1
92  %r40 = fptoui double undef to i1
93  ; CHECK:  Found an estimated cost of 2 for instruction:   %r41 = fptosi double undef to i1
94  %r41 = fptosi double undef to i1
95  ; CHECK:  Found an estimated cost of 2 for instruction:   %r42 = fptoui double undef to i8
96  %r42 = fptoui double undef to i8
97  ; CHECK:  Found an estimated cost of 2 for instruction:   %r43 = fptosi double undef to i8
98  %r43 = fptosi double undef to i8
99  ; CHECK:  Found an estimated cost of 2 for instruction:   %r44 = fptoui double undef to i16
100  %r44 = fptoui double undef to i16
101  ; CHECK:  Found an estimated cost of 2 for instruction:   %r45 = fptosi double undef to i16
102  %r45 = fptosi double undef to i16
103  ; CHECK:  Found an estimated cost of 2 for instruction:   %r46 = fptoui double undef to i32
104  %r46 = fptoui double undef to i32
105  ; CHECK:  Found an estimated cost of 2 for instruction:   %r47 = fptosi double undef to i32
106  %r47 = fptosi double undef to i32
107  ; Function call
108  ; CHECK:  Found an estimated cost of 10 for instruction:   %r48 = fptoui double undef to i64
109  %r48 = fptoui double undef to i64
110  ; CHECK:  Found an estimated cost of 10 for instruction:   %r49 = fptosi double undef to i64
111  %r49 = fptosi double undef to i64
112
113  ; CHECK:  Found an estimated cost of 2 for instruction:   %r50 = sitofp i1 undef to float
114  %r50 = sitofp i1 undef to float
115  ; CHECK:  Found an estimated cost of 2 for instruction:   %r51 = uitofp i1 undef to float
116  %r51 = uitofp i1 undef to float
117  ; CHECK:  Found an estimated cost of 2 for instruction:   %r52 = sitofp i1 undef to double
118  %r52 = sitofp i1 undef to double
119  ; CHECK:  Found an estimated cost of 2 for instruction:   %r53 = uitofp i1 undef to double
120  %r53 = uitofp i1 undef to double
121  ; CHECK:  Found an estimated cost of 2 for instruction:   %r54 = sitofp i8 undef to float
122  %r54 = sitofp i8 undef to float
123  ; CHECK:  Found an estimated cost of 2 for instruction:   %r55 = uitofp i8 undef to float
124  %r55 = uitofp i8 undef to float
125  ; CHECK:  Found an estimated cost of 2 for instruction:   %r56 = sitofp i8 undef to double
126  %r56 = sitofp i8 undef to double
127  ; CHECK:  Found an estimated cost of 2 for instruction:   %r57 = uitofp i8 undef to double
128  %r57 = uitofp i8 undef to double
129  ; CHECK:  Found an estimated cost of 2 for instruction:   %r58 = sitofp i16 undef to float
130  %r58 = sitofp i16 undef to float
131  ; CHECK:  Found an estimated cost of 2 for instruction:   %r59 = uitofp i16 undef to float
132  %r59 = uitofp i16 undef to float
133  ; CHECK:  Found an estimated cost of 2 for instruction:   %r60 = sitofp i16 undef to double
134  %r60 = sitofp i16 undef to double
135  ; CHECK:  Found an estimated cost of 2 for instruction:   %r61 = uitofp i16 undef to double
136  %r61 = uitofp i16 undef to double
137  ; CHECK:  Found an estimated cost of 2 for instruction:   %r62 = sitofp i32 undef to float
138  %r62 = sitofp i32 undef to float
139  ; CHECK:  Found an estimated cost of 2 for instruction:   %r63 = uitofp i32 undef to float
140  %r63 = uitofp i32 undef to float
141  ; CHECK:  Found an estimated cost of 2 for instruction:   %r64 = sitofp i32 undef to double
142  %r64 = sitofp i32 undef to double
143  ; CHECK:  Found an estimated cost of 2 for instruction:   %r65 = uitofp i32 undef to double
144  %r65 = uitofp i32 undef to double
145  ; Function call
146  ; CHECK:  Found an estimated cost of 10 for instruction:   %r66 = sitofp i64 undef to float
147  %r66 = sitofp i64 undef to float
148  ; CHECK:  Found an estimated cost of 10 for instruction:   %r67 = uitofp i64 undef to float
149  %r67 = uitofp i64 undef to float
150  ; CHECK:  Found an estimated cost of 10 for instruction:   %r68 = sitofp i64 undef to double
151  %r68 = sitofp i64 undef to double
152  ; CHECK:  Found an estimated cost of 10 for instruction:   %r69 = uitofp i64 undef to double
153  %r69 = uitofp i64 undef to double
154
155  ; CHECK:  Found an estimated cost of 3 for instruction:   %r70 = sext <8 x i8> undef to <8 x i32>
156  %r70 = sext <8 x i8> undef to <8 x i32>
157  ; CHECK:  Found an estimated cost of 6 for instruction:   %r71 = sext <16 x i8> undef to <16 x i32>
158  %r71 = sext <16 x i8> undef to <16 x i32>
159  ; CHECK:  Found an estimated cost of 3 for instruction:   %r72 = zext <8 x i8> undef to <8 x i32>
160  %r72 = zext <8 x i8> undef to <8 x i32>
161  ; CHECK:  Found an estimated cost of 6 for instruction:   %r73 = zext <16 x i8> undef to <16 x i32>
162  %r73 = zext <16 x i8> undef to <16 x i32>
163
164  ; CHECK:  Found an estimated cost of 7 for instruction:   %rext_0 = sext <8 x i8> undef to <8 x i64>
165  %rext_0 = sext <8 x i8> undef to <8 x i64>
166  ; CHECK:  Found an estimated cost of 7 for instruction:   %rext_1 = zext <8 x i8> undef to <8 x i64>
167  %rext_1 = zext <8 x i8> undef to <8 x i64>
168  ; CHECK:  Found an estimated cost of 6 for instruction:   %rext_2 = sext <8 x i16> undef to <8 x i64>
169  %rext_2 = sext <8 x i16> undef to <8 x i64>
170  ; CHECK:  Found an estimated cost of 6 for instruction:   %rext_3 = zext <8 x i16> undef to <8 x i64>
171  %rext_3 = zext <8 x i16> undef to <8 x i64>
172  ; CHECK:  Found an estimated cost of 3 for instruction:   %rext_4 = sext <4 x i16> undef to <4 x i64>
173  %rext_4 = sext <4 x i16> undef to <4 x i64>
174  ; CHECK:  Found an estimated cost of 3 for instruction:   %rext_5 = zext <4 x i16> undef to <4 x i64>
175  %rext_5 = zext <4 x i16> undef to <4 x i64>
176
177  ; Vector cast cost of instructions lowering the cast to the stack.
178  ; CHECK:  Found an estimated cost of 3 for instruction:   %r74 = trunc <8 x i32> undef to <8 x i8>
179  %r74 = trunc <8 x i32> undef to <8 x i8>
180  ; CHECK:  Found an estimated cost of 6 for instruction:   %r75 = trunc <16 x i32> undef to <16 x i8>
181  %r75 = trunc <16 x i32> undef to <16 x i8>
182
183  ; Floating point truncation costs.
184  ; CHECK:  Found an estimated cost of 1 for instruction:   %r80 = fptrunc double undef to float
185  %r80 = fptrunc double undef to float
186  ; CHECK:  Found an estimated cost of 2 for instruction:   %r81 = fptrunc <2 x double> undef to <2 x float>
187  %r81 = fptrunc <2 x double> undef to <2 x float>
188  ; CHECK:  Found an estimated cost of 4 for instruction:   %r82 = fptrunc <4 x double> undef to <4 x float>
189  %r82 = fptrunc <4 x double> undef to <4 x float>
190  ; CHECK:  Found an estimated cost of 8 for instruction:   %r83 = fptrunc <8 x double> undef to <8 x float>
191  %r83 = fptrunc <8 x double> undef to <8 x float>
192  ; CHECK:  Found an estimated cost of 16 for instruction:   %r84 = fptrunc <16 x double> undef to <16 x float>
193  %r84 = fptrunc <16 x double> undef to <16 x float>
194
195  ; Floating point extension costs.
196  ; CHECK:  Found an estimated cost of 1 for instruction:   %r85 = fpext float undef to double
197  %r85 = fpext float undef to double
198  ; CHECK:  Found an estimated cost of 2 for instruction:   %r86 = fpext <2 x float> undef to <2 x double>
199  %r86 = fpext <2 x float> undef to <2 x double>
200  ; CHECK:  Found an estimated cost of 4 for instruction:   %r87 = fpext <4 x float> undef to <4 x double>
201  %r87 = fpext <4 x float> undef to <4 x double>
202  ; CHECK:  Found an estimated cost of 8 for instruction:   %r88 = fpext <8 x float> undef to <8 x double>
203  %r88 = fpext <8 x float> undef to <8 x double>
204  ; CHECK:  Found an estimated cost of 16 for instruction:   %r89 = fpext <16 x float> undef to <16 x double>
205  %r89 = fpext <16 x float> undef to <16 x double>
206
207  ;; Floating point to integer vector casts.
208  ; CHECK:  Found an estimated cost of 1 for instruction:   %r90 = fptoui <2 x float> undef to <2 x i1>
209  %r90 = fptoui <2 x float> undef to <2 x i1>
210  ; CHECK:  Found an estimated cost of 1 for instruction:   %r91 = fptosi <2 x float> undef to <2 x i1>
211  %r91 = fptosi <2 x float> undef to <2 x i1>
212  ; CHECK:  Found an estimated cost of 1 for instruction:   %r92 = fptoui <2 x float> undef to <2 x i8>
213  %r92 = fptoui <2 x float> undef to <2 x i8>
214  ; CHECK:  Found an estimated cost of 1 for instruction:   %r93 = fptosi <2 x float> undef to <2 x i8>
215  %r93 = fptosi <2 x float> undef to <2 x i8>
216  ; CHECK:  Found an estimated cost of 1 for instruction:   %r94 = fptoui <2 x float> undef to <2 x i16>
217  %r94 = fptoui <2 x float> undef to <2 x i16>
218  ; CHECK:  Found an estimated cost of 1 for instruction:   %r95 = fptosi <2 x float> undef to <2 x i16>
219  %r95 = fptosi <2 x float> undef to <2 x i16>
220  ; CHECK:  Found an estimated cost of 1 for instruction:   %r96 = fptoui <2 x float> undef to <2 x i32>
221  %r96 = fptoui <2 x float> undef to <2 x i32>
222  ; CHECK:  Found an estimated cost of 1 for instruction:   %r97 = fptosi <2 x float> undef to <2 x i32>
223  %r97 = fptosi <2 x float> undef to <2 x i32>
224  ; CHECK:  Found an estimated cost of 32 for instruction:   %r98 = fptoui <2 x float> undef to <2 x i64>
225  %r98 = fptoui <2 x float> undef to <2 x i64>
226  ; CHECK:  Found an estimated cost of 32 for instruction:   %r99 = fptosi <2 x float> undef to <2 x i64>
227  %r99 = fptosi <2 x float> undef to <2 x i64>
228
229  ; CHECK:  Found an estimated cost of 16 for instruction:   %r100 = fptoui <2 x double> undef to <2 x i1>
230  %r100 = fptoui <2 x double> undef to <2 x i1>
231  ; CHECK:  Found an estimated cost of 16 for instruction:   %r101 = fptosi <2 x double> undef to <2 x i1>
232  %r101 = fptosi <2 x double> undef to <2 x i1>
233  ; CHECK:  Found an estimated cost of 16 for instruction:   %r102 = fptoui <2 x double> undef to <2 x i8>
234  %r102 = fptoui <2 x double> undef to <2 x i8>
235  ; CHECK:  Found an estimated cost of 16 for instruction:   %r103 = fptosi <2 x double> undef to <2 x i8>
236  %r103 = fptosi <2 x double> undef to <2 x i8>
237  ; CHECK:  Found an estimated cost of 16 for instruction:   %r104 = fptoui <2 x double> undef to <2 x i16>
238  %r104 = fptoui <2 x double> undef to <2 x i16>
239  ; CHECK:  Found an estimated cost of 16 for instruction:   %r105 = fptosi <2 x double> undef to <2 x i16>
240  %r105 = fptosi <2 x double> undef to <2 x i16>
241  ; CHECK:  Found an estimated cost of 2 for instruction:   %r106 = fptoui <2 x double> undef to <2 x i32>
242  %r106 = fptoui <2 x double> undef to <2 x i32>
243  ; CHECK:  Found an estimated cost of 2 for instruction:   %r107 = fptosi <2 x double> undef to <2 x i32>
244  %r107 = fptosi <2 x double> undef to <2 x i32>
245  ; CHECK:  Found an estimated cost of 32 for instruction:   %r108 = fptoui <2 x double> undef to <2 x i64>
246  %r108 = fptoui <2 x double> undef to <2 x i64>
247  ; CHECK:  Found an estimated cost of 32 for instruction:   %r109 = fptosi <2 x double> undef to <2 x i64>
248  %r109 = fptosi <2 x double> undef to <2 x i64>
249
250  ; CHECK:  Found an estimated cost of 32 for instruction:   %r110 = fptoui <4 x float> undef to <4 x i1>
251  %r110 = fptoui <4 x float> undef to <4 x i1>
252  ; CHECK:  Found an estimated cost of 32 for instruction:   %r111 = fptosi <4 x float> undef to <4 x i1>
253  %r111 = fptosi <4 x float> undef to <4 x i1>
254  ; CHECK:  Found an estimated cost of 3 for instruction:   %r112 = fptoui <4 x float> undef to <4 x i8>
255  %r112 = fptoui <4 x float> undef to <4 x i8>
256  ; CHECK:  Found an estimated cost of 3 for instruction:   %r113 = fptosi <4 x float> undef to <4 x i8>
257  %r113 = fptosi <4 x float> undef to <4 x i8>
258
259  ; CHECK:  Found an estimated cost of 2 for instruction:   %r114 = fptoui <4 x float> undef to <4 x i16>
260  %r114 = fptoui <4 x float> undef to <4 x i16>
261  ; CHECK:  Found an estimated cost of 2 for instruction:   %r115 = fptosi <4 x float> undef to <4 x i16>
262  %r115 = fptosi <4 x float> undef to <4 x i16>
263  ; CHECK:  Found an estimated cost of 1 for instruction:   %r116 = fptoui <4 x float> undef to <4 x i32>
264  %r116 = fptoui <4 x float> undef to <4 x i32>
265  ; CHECK:  Found an estimated cost of 1 for instruction:   %r117 = fptosi <4 x float> undef to <4 x i32>
266  %r117 = fptosi <4 x float> undef to <4 x i32>
267  ; CHECK:  Found an estimated cost of 65 for instruction:   %r118 = fptoui <4 x float> undef to <4 x i64>
268  %r118 = fptoui <4 x float> undef to <4 x i64>
269  ; CHECK:  Found an estimated cost of 65 for instruction:   %r119 = fptosi <4 x float> undef to <4 x i64>
270  %r119 = fptosi <4 x float> undef to <4 x i64>
271
272  ; CHECK:  Found an estimated cost of 33 for instruction:   %r120 = fptoui <4 x double> undef to <4 x i1>
273  %r120 = fptoui <4 x double> undef to <4 x i1>
274  ; CHECK:  Found an estimated cost of 33 for instruction:   %r121 = fptosi <4 x double> undef to <4 x i1>
275  %r121 = fptosi <4 x double> undef to <4 x i1>
276  ; CHECK:  Found an estimated cost of 33 for instruction:   %r122 = fptoui <4 x double> undef to <4 x i8>
277  %r122 = fptoui <4 x double> undef to <4 x i8>
278  ; CHECK:  Found an estimated cost of 33 for instruction:   %r123 = fptosi <4 x double> undef to <4 x i8>
279  %r123 = fptosi <4 x double> undef to <4 x i8>
280  ; CHECK:  Found an estimated cost of 33 for instruction:   %r124 = fptoui <4 x double> undef to <4 x i16>
281  %r124 = fptoui <4 x double> undef to <4 x i16>
282  ; CHECK:  Found an estimated cost of 33 for instruction:   %r125 = fptosi <4 x double> undef to <4 x i16>
283  %r125 = fptosi <4 x double> undef to <4 x i16>
284  ; CHECK:  Found an estimated cost of 5 for instruction:   %r126 = fptoui <4 x double> undef to <4 x i32>
285  %r126 = fptoui <4 x double> undef to <4 x i32>
286  ; CHECK:  Found an estimated cost of 5 for instruction:   %r127 = fptosi <4 x double> undef to <4 x i32>
287  %r127 = fptosi <4 x double> undef to <4 x i32>
288  ; CHECK:  Found an estimated cost of 65 for instruction:   %r128 = fptoui <4 x double> undef to <4 x i64>
289  %r128 = fptoui <4 x double> undef to <4 x i64>
290  ; CHECK:  Found an estimated cost of 65 for instruction:   %r129 = fptosi <4 x double> undef to <4 x i64>
291  %r129 = fptosi <4 x double> undef to <4 x i64>
292
293  ; CHECK:  Found an estimated cost of 65 for instruction:   %r130 = fptoui <8 x float> undef to <8 x i1>
294  %r130 = fptoui <8 x float> undef to <8 x i1>
295  ; CHECK:  Found an estimated cost of 65 for instruction:   %r131 = fptosi <8 x float> undef to <8 x i1>
296  %r131 = fptosi <8 x float> undef to <8 x i1>
297  ; CHECK:  Found an estimated cost of 7 for instruction:   %r132 = fptoui <8 x float> undef to <8 x i8>
298  %r132 = fptoui <8 x float> undef to <8 x i8>
299  ; CHECK:  Found an estimated cost of 7 for instruction:   %r133 = fptosi <8 x float> undef to <8 x i8>
300  %r133 = fptosi <8 x float> undef to <8 x i8>
301  ; CHECK:  Found an estimated cost of 4 for instruction:   %r134 = fptoui <8 x float> undef to <8 x i16>
302  %r134 = fptoui <8 x float> undef to <8 x i16>
303  ; CHECK:  Found an estimated cost of 4 for instruction:   %r135 = fptosi <8 x float> undef to <8 x i16>
304  %r135 = fptosi <8 x float> undef to <8 x i16>
305  ; CHECK:  Found an estimated cost of 2 for instruction:   %r136 = fptoui <8 x float> undef to <8 x i32>
306  %r136 = fptoui <8 x float> undef to <8 x i32>
307  ; CHECK:  Found an estimated cost of 2 for instruction:   %r137 = fptosi <8 x float> undef to <8 x i32>
308  %r137 = fptosi <8 x float> undef to <8 x i32>
309  ; CHECK:  Found an estimated cost of 131 for instruction:   %r138 = fptoui <8 x float> undef to <8 x i64>
310  %r138 = fptoui <8 x float> undef to <8 x i64>
311  ; CHECK:  Found an estimated cost of 131 for instruction:   %r139 = fptosi <8 x float> undef to <8 x i64>
312  %r139 = fptosi <8 x float> undef to <8 x i64>
313
314  ; CHECK:  Found an estimated cost of 67 for instruction:   %r140 = fptoui <8 x double> undef to <8 x i1>
315  %r140 = fptoui <8 x double> undef to <8 x i1>
316  ; CHECK:  Found an estimated cost of 67 for instruction:   %r141 = fptosi <8 x double> undef to <8 x i1>
317  %r141 = fptosi <8 x double> undef to <8 x i1>
318  ; CHECK:  Found an estimated cost of 67 for instruction:   %r142 = fptoui <8 x double> undef to <8 x i8>
319  %r142 = fptoui <8 x double> undef to <8 x i8>
320  ; CHECK:  Found an estimated cost of 67 for instruction:   %r143 = fptosi <8 x double> undef to <8 x i8>
321  %r143 = fptosi <8 x double> undef to <8 x i8>
322  ; CHECK:  Found an estimated cost of 67 for instruction:   %r144 = fptoui <8 x double> undef to <8 x i16>
323  %r144 = fptoui <8 x double> undef to <8 x i16>
324  ; CHECK:  Found an estimated cost of 67 for instruction:   %r145 = fptosi <8 x double> undef to <8 x i16>
325  %r145 = fptosi <8 x double> undef to <8 x i16>
326  ; CHECK:  Found an estimated cost of 11 for instruction:   %r146 = fptoui <8 x double> undef to <8 x i32>
327  %r146 = fptoui <8 x double> undef to <8 x i32>
328  ; CHECK:  Found an estimated cost of 11 for instruction:   %r147 = fptosi <8 x double> undef to <8 x i32>
329  %r147 = fptosi <8 x double> undef to <8 x i32>
330  ; CHECK:  Found an estimated cost of 131 for instruction:   %r148 = fptoui <8 x double> undef to <8 x i64>
331  %r148 = fptoui <8 x double> undef to <8 x i64>
332  ; CHECK:  Found an estimated cost of 131 for instruction:   %r149 = fptosi <8 x double> undef to <8 x i64>
333  %r149 = fptosi <8 x double> undef to <8 x i64>
334
335  ; CHECK:  Found an estimated cost of 131 for instruction:   %r150 = fptoui <16 x float> undef to <16 x i1>
336  %r150 = fptoui <16 x float> undef to <16 x i1>
337  ; CHECK:  Found an estimated cost of 131 for instruction:   %r151 = fptosi <16 x float> undef to <16 x i1>
338  %r151 = fptosi <16 x float> undef to <16 x i1>
339 ; CHECK:  Found an estimated cost of 15 for instruction:   %r152 = fptoui <16 x float> undef to <16 x i8>
340  %r152 = fptoui <16 x float> undef to <16 x i8>
341  ; CHECK:  Found an estimated cost of 15 for instruction:   %r153 = fptosi <16 x float> undef to <16 x i8>
342  %r153 = fptosi <16 x float> undef to <16 x i8>
343  ; CHECK:  Found an estimated cost of 8 for instruction:   %r154 = fptoui <16 x float> undef to <16 x i16>
344  %r154 = fptoui <16 x float> undef to <16 x i16>
345  ; CHECK:  Found an estimated cost of 8 for instruction:   %r155 = fptosi <16 x float> undef to <16 x i16>
346  %r155 = fptosi <16 x float> undef to <16 x i16>
347  ; CHECK:  Found an estimated cost of 4 for instruction:   %r156 = fptoui <16 x float> undef to <16 x i32>
348  %r156 = fptoui <16 x float> undef to <16 x i32>
349  ; CHECK:  Found an estimated cost of 4 for instruction:   %r157 = fptosi <16 x float> undef to <16 x i32>
350  %r157 = fptosi <16 x float> undef to <16 x i32>
351  ; CHECK:  Found an estimated cost of 263 for instruction:   %r158 = fptoui <16 x float> undef to <16 x i64>
352  %r158 = fptoui <16 x float> undef to <16 x i64>
353  ; CHECK:  Found an estimated cost of 263 for instruction:   %r159 = fptosi <16 x float> undef to <16 x i64>
354  %r159 = fptosi <16 x float> undef to <16 x i64>
355
356  ; CHECK:  Found an estimated cost of 135 for instruction:   %r160 = fptoui <16 x double> undef to <16 x i1>
357  %r160 = fptoui <16 x double> undef to <16 x i1>
358  ; CHECK:  Found an estimated cost of 135 for instruction:   %r161 = fptosi <16 x double> undef to <16 x i1>
359  %r161 = fptosi <16 x double> undef to <16 x i1>
360  ; CHECK:  Found an estimated cost of 135 for instruction:   %r162 = fptoui <16 x double> undef to <16 x i8>
361  %r162 = fptoui <16 x double> undef to <16 x i8>
362  ; CHECK:  Found an estimated cost of 135 for instruction:   %r163 = fptosi <16 x double> undef to <16 x i8>
363  %r163 = fptosi <16 x double> undef to <16 x i8>
364  ; CHECK:  Found an estimated cost of 135 for instruction:   %r164 = fptoui <16 x double> undef to <16 x i16>
365  %r164 = fptoui <16 x double> undef to <16 x i16>
366  ; CHECK:  Found an estimated cost of 135 for instruction:   %r165 = fptosi <16 x double> undef to <16 x i16>
367  %r165 = fptosi <16 x double> undef to <16 x i16>
368  ; CHECK:  Found an estimated cost of 23 for instruction:   %r166 = fptoui <16 x double> undef to <16 x i32>
369  %r166 = fptoui <16 x double> undef to <16 x i32>
370  ; CHECK:  Found an estimated cost of 23 for instruction:   %r167 = fptosi <16 x double> undef to <16 x i32>
371  %r167 = fptosi <16 x double> undef to <16 x i32>
372  ; CHECK:  Found an estimated cost of 263 for instruction:   %r168 = fptoui <16 x double> undef to <16 x i64>
373  %r168 = fptoui <16 x double> undef to <16 x i64>
374  ; CHECK:  Found an estimated cost of 263 for instruction:   %r169 = fptosi <16 x double> undef to <16 x i64>
375  %r169 = fptosi <16 x double> undef to <16 x i64>
376
377  ; CHECK:  Found an estimated cost of 12 for instruction:   %r170 = uitofp <2 x i1> undef to <2 x float>
378  %r170 = uitofp <2 x i1> undef to <2 x float>
379  ; CHECK:  Found an estimated cost of 12 for instruction:   %r171 = sitofp <2 x i1> undef to <2 x float>
380  %r171 = sitofp <2 x i1> undef to <2 x float>
381  ; CHECK:  Found an estimated cost of 3 for instruction:   %r172 = uitofp <2 x i8> undef to <2 x float>
382  %r172 = uitofp <2 x i8> undef to <2 x float>
383  ; CHECK:  Found an estimated cost of 3 for instruction:   %r173 = sitofp <2 x i8> undef to <2 x float>
384  %r173 = sitofp <2 x i8> undef to <2 x float>
385  ; CHECK:  Found an estimated cost of 2 for instruction:   %r174 = uitofp <2 x i16> undef to <2 x float>
386  %r174 = uitofp <2 x i16> undef to <2 x float>
387  ; CHECK:  Found an estimated cost of 2 for instruction:   %r175 = sitofp <2 x i16> undef to <2 x float>
388  %r175 = sitofp <2 x i16> undef to <2 x float>
389  ; CHECK:  Found an estimated cost of 1 for instruction:   %r176 = uitofp <2 x i32> undef to <2 x float>
390  %r176 = uitofp <2 x i32> undef to <2 x float>
391  ; CHECK:  Found an estimated cost of 1 for instruction:   %r177 = sitofp <2 x i32> undef to <2 x float>
392  %r177 = sitofp <2 x i32> undef to <2 x float>
393  ; CHECK:  Found an estimated cost of 28 for instruction:   %r178 = uitofp <2 x i64> undef to <2 x float>
394  %r178 = uitofp <2 x i64> undef to <2 x float>
395  ; CHECK:  Found an estimated cost of 28 for instruction:   %r179 = sitofp <2 x i64> undef to <2 x float>
396  %r179 = sitofp <2 x i64> undef to <2 x float>
397
398  ; CHECK:  Found an estimated cost of 8 for instruction:   %r180 = uitofp <2 x i1> undef to <2 x double>
399  %r180 = uitofp <2 x i1> undef to <2 x double>
400  ; CHECK:  Found an estimated cost of 8 for instruction:   %r181 = sitofp <2 x i1> undef to <2 x double>
401  %r181 = sitofp <2 x i1> undef to <2 x double>
402  ; CHECK:  Found an estimated cost of 4 for instruction:   %r182 = uitofp <2 x i8> undef to <2 x double>
403  %r182 = uitofp <2 x i8> undef to <2 x double>
404  ; CHECK:  Found an estimated cost of 4 for instruction:   %r183 = sitofp <2 x i8> undef to <2 x double>
405  %r183 = sitofp <2 x i8> undef to <2 x double>
406  ; CHECK:  Found an estimated cost of 3 for instruction:   %r184 = uitofp <2 x i16> undef to <2 x double>
407  %r184 = uitofp <2 x i16> undef to <2 x double>
408  ; CHECK:  Found an estimated cost of 3 for instruction:   %r185 = sitofp <2 x i16> undef to <2 x double>
409  %r185 = sitofp <2 x i16> undef to <2 x double>
410  ; CHECK:  Found an estimated cost of 2 for instruction:   %r186 = uitofp <2 x i32> undef to <2 x double>
411  %r186 = uitofp <2 x i32> undef to <2 x double>
412  ; CHECK:  Found an estimated cost of 2 for instruction:   %r187 = sitofp <2 x i32> undef to <2 x double>
413  %r187 = sitofp <2 x i32> undef to <2 x double>
414  ; CHECK:  Found an estimated cost of 24 for instruction:   %r188 = uitofp <2 x i64> undef to <2 x double>
415  %r188 = uitofp <2 x i64> undef to <2 x double>
416  ; CHECK:  Found an estimated cost of 24 for instruction:   %r189 = sitofp <2 x i64> undef to <2 x double>
417  %r189 = sitofp <2 x i64> undef to <2 x double>
418
419  ; CHECK:  Found an estimated cost of 3 for instruction:   %r190 = uitofp <4 x i1> undef to <4 x float>
420  %r190 = uitofp <4 x i1> undef to <4 x float>
421  ; CHECK:  Found an estimated cost of 3 for instruction:   %r191 = sitofp <4 x i1> undef to <4 x float>
422  %r191 = sitofp <4 x i1> undef to <4 x float>
423  ; CHECK:  Found an estimated cost of 3 for instruction:   %r192 = uitofp <4 x i8> undef to <4 x float>
424  %r192 = uitofp <4 x i8> undef to <4 x float>
425  ; CHECK:  Found an estimated cost of 3 for instruction:   %r193 = sitofp <4 x i8> undef to <4 x float>
426  %r193 = sitofp <4 x i8> undef to <4 x float>
427  ; CHECK:  Found an estimated cost of 2 for instruction:   %r194 = uitofp <4 x i16> undef to <4 x float>
428  %r194 = uitofp <4 x i16> undef to <4 x float>
429  ; CHECK:  Found an estimated cost of 2 for instruction:   %r195 = sitofp <4 x i16> undef to <4 x float>
430  %r195 = sitofp <4 x i16> undef to <4 x float>
431  ; CHECK:  Found an estimated cost of 1 for instruction:   %r196 = uitofp <4 x i32> undef to <4 x float>
432  %r196 = uitofp <4 x i32> undef to <4 x float>
433  ; CHECK:  Found an estimated cost of 1 for instruction:   %r197 = sitofp <4 x i32> undef to <4 x float>
434  %r197 = sitofp <4 x i32> undef to <4 x float>
435  ; CHECK:  Found an estimated cost of 57 for instruction:   %r198 = uitofp <4 x i64> undef to <4 x float>
436  %r198 = uitofp <4 x i64> undef to <4 x float>
437  ; CHECK:  Found an estimated cost of 57 for instruction:   %r199 = sitofp <4 x i64> undef to <4 x float>
438  %r199 = sitofp <4 x i64> undef to <4 x float>
439
440  ; CHECK:  Found an estimated cost of 17 for instruction:   %r200 = uitofp <4 x i1> undef to <4 x double>
441  %r200 = uitofp <4 x i1> undef to <4 x double>
442  ; CHECK:  Found an estimated cost of 17 for instruction:   %r201 = sitofp <4 x i1> undef to <4 x double>
443  %r201 = sitofp <4 x i1> undef to <4 x double>
444  ; CHECK:  Found an estimated cost of 9 for instruction:   %r202 = uitofp <4 x i8> undef to <4 x double>
445  %r202 = uitofp <4 x i8> undef to <4 x double>
446  ; CHECK:  Found an estimated cost of 9 for instruction:   %r203 = sitofp <4 x i8> undef to <4 x double>
447  %r203 = sitofp <4 x i8> undef to <4 x double>
448  ; CHECK:  Found an estimated cost of 7 for instruction:   %r204 = uitofp <4 x i16> undef to <4 x double>
449  %r204 = uitofp <4 x i16> undef to <4 x double>
450  ; CHECK:  Found an estimated cost of 7 for instruction:   %r205 = sitofp <4 x i16> undef to <4 x double>
451  %r205 = sitofp <4 x i16> undef to <4 x double>
452  ; CHECK:  Found an estimated cost of 5 for instruction:   %r206 = uitofp <4 x i32> undef to <4 x double>
453  %r206 = uitofp <4 x i32> undef to <4 x double>
454  ; CHECK:  Found an estimated cost of 5 for instruction:   %r207 = sitofp <4 x i32> undef to <4 x double>
455  %r207 = sitofp <4 x i32> undef to <4 x double>
456  ; CHECK:  Found an estimated cost of 49 for instruction:   %r208 = uitofp <4 x i64> undef to <4 x double>
457  %r208 = uitofp <4 x i64> undef to <4 x double>
458  ; CHECK:  Found an estimated cost of 49 for instruction:   %r209 = sitofp <4 x i64> undef to <4 x double>
459  %r209 = sitofp <4 x i64> undef to <4 x double>
460
461  ; CHECK:  Found an estimated cost of 7 for instruction:   %r210 = uitofp <8 x i1> undef to <8 x float>
462  %r210 = uitofp <8 x i1> undef to <8 x float>
463  ; CHECK:  Found an estimated cost of 7 for instruction:   %r211 = sitofp <8 x i1> undef to <8 x float>
464  %r211 = sitofp <8 x i1> undef to <8 x float>
465  ; CHECK:  Found an estimated cost of 7 for instruction:   %r212 = uitofp <8 x i8> undef to <8 x float>
466  %r212 = uitofp <8 x i8> undef to <8 x float>
467  ; CHECK:  Found an estimated cost of 7 for instruction:   %r213 = sitofp <8 x i8> undef to <8 x float>
468  %r213 = sitofp <8 x i8> undef to <8 x float>
469  ; CHECK:  Found an estimated cost of 4 for instruction:   %r214 = uitofp <8 x i16> undef to <8 x float>
470  %r214 = uitofp <8 x i16> undef to <8 x float>
471  ; CHECK:  Found an estimated cost of 4 for instruction:   %r215 = sitofp <8 x i16> undef to <8 x float>
472  %r215 = sitofp <8 x i16> undef to <8 x float>
473  ; CHECK:  Found an estimated cost of 2 for instruction:   %r216 = uitofp <8 x i32> undef to <8 x float>
474  %r216 = uitofp <8 x i32> undef to <8 x float>
475  ; CHECK:  Found an estimated cost of 2 for instruction:   %r217 = sitofp <8 x i32> undef to <8 x float>
476  %r217 = sitofp <8 x i32> undef to <8 x float>
477  ; CHECK:  Found an estimated cost of 115 for instruction:   %r218 = uitofp <8 x i64> undef to <8 x float>
478  %r218 = uitofp <8 x i64> undef to <8 x float>
479  ; CHECK:  Found an estimated cost of 115 for instruction:   %r219 = sitofp <8 x i64> undef to <8 x float>
480  %r219 = sitofp <8 x i64> undef to <8 x float>
481
482  ; CHECK:  Found an estimated cost of 35 for instruction:   %r220 = uitofp <8 x i1> undef to <8 x double>
483  %r220 = uitofp <8 x i1> undef to <8 x double>
484  ; CHECK:  Found an estimated cost of 35 for instruction:   %r221 = sitofp <8 x i1> undef to <8 x double>
485  %r221 = sitofp <8 x i1> undef to <8 x double>
486  ; CHECK:  Found an estimated cost of 19 for instruction:   %r222 = uitofp <8 x i8> undef to <8 x double>
487  %r222 = uitofp <8 x i8> undef to <8 x double>
488  ; CHECK:  Found an estimated cost of 19 for instruction:   %r223 = sitofp <8 x i8> undef to <8 x double>
489  %r223 = sitofp <8 x i8> undef to <8 x double>
490  ; CHECK:  Found an estimated cost of 15 for instruction:   %r224 = uitofp <8 x i16> undef to <8 x double>
491  %r224 = uitofp <8 x i16> undef to <8 x double>
492  ; CHECK:  Found an estimated cost of 15 for instruction:   %r225 = sitofp <8 x i16> undef to <8 x double>
493  %r225 = sitofp <8 x i16> undef to <8 x double>
494  ; CHECK:  Found an estimated cost of 15 for instruction:   %r226 = uitofp <8 x i16> undef to <8 x double>
495  %r226 = uitofp <8 x i16> undef to <8 x double>
496  ; CHECK:  Found an estimated cost of 15 for instruction:   %r227 = sitofp <8 x i16> undef to <8 x double>
497  %r227 = sitofp <8 x i16> undef to <8 x double>
498  ; CHECK:  Found an estimated cost of 99 for instruction:   %r228 = uitofp <8 x i64> undef to <8 x double>
499  %r228 = uitofp <8 x i64> undef to <8 x double>
500  ; CHECK:  Found an estimated cost of 99 for instruction:   %r229 = sitofp <8 x i64> undef to <8 x double>
501  %r229 = sitofp <8 x i64> undef to <8 x double>
502
503  ; CHECK:  Found an estimated cost of 15 for instruction:   %r230 = uitofp <16 x i1> undef to <16 x float>
504  %r230 = uitofp <16 x i1> undef to <16 x float>
505  ; CHECK:  Found an estimated cost of 15 for instruction:   %r231 = sitofp <16 x i1> undef to <16 x float>
506  %r231 = sitofp <16 x i1> undef to <16 x float>
507  ; CHECK:  Found an estimated cost of 15 for instruction:   %r232 = uitofp <16 x i8> undef to <16 x float>
508  %r232 = uitofp <16 x i8> undef to <16 x float>
509  ; CHECK:  Found an estimated cost of 15 for instruction:   %r233 = sitofp <16 x i8> undef to <16 x float>
510  %r233 = sitofp <16 x i8> undef to <16 x float>
511  ; CHECK:  Found an estimated cost of 8 for instruction:   %r234 = uitofp <16 x i16> undef to <16 x float>
512  %r234 = uitofp <16 x i16> undef to <16 x float>
513  ; CHECK:  Found an estimated cost of 8 for instruction:   %r235 = sitofp <16 x i16> undef to <16 x float>
514  %r235 = sitofp <16 x i16> undef to <16 x float>
515  ; CHECK:  Found an estimated cost of 4 for instruction:   %r236 = uitofp <16 x i32> undef to <16 x float>
516  %r236 = uitofp <16 x i32> undef to <16 x float>
517  ; CHECK:  Found an estimated cost of 4 for instruction:   %r237 = sitofp <16 x i32> undef to <16 x float>
518  %r237 = sitofp <16 x i32> undef to <16 x float>
519  ; CHECK:  Found an estimated cost of 231 for instruction:   %r238 = uitofp <16 x i64> undef to <16 x float>
520  %r238 = uitofp <16 x i64> undef to <16 x float>
521  ; CHECK:  Found an estimated cost of 231 for instruction:   %r239 = sitofp <16 x i64> undef to <16 x float>
522  %r239 = sitofp <16 x i64> undef to <16 x float>
523
524  ; CHECK:  Found an estimated cost of 71 for instruction:   %r240 = uitofp <16 x i1> undef to <16 x double>
525  %r240 = uitofp <16 x i1> undef to <16 x double>
526  ; CHECK:  Found an estimated cost of 71 for instruction:   %r241 = sitofp <16 x i1> undef to <16 x double>
527  %r241 = sitofp <16 x i1> undef to <16 x double>
528  ; CHECK:  Found an estimated cost of 39 for instruction:   %r242 = uitofp <16 x i8> undef to <16 x double>
529  %r242 = uitofp <16 x i8> undef to <16 x double>
530  ; CHECK:  Found an estimated cost of 39 for instruction:   %r243 = sitofp <16 x i8> undef to <16 x double>
531  %r243 = sitofp <16 x i8> undef to <16 x double>
532  ; CHECK:  Found an estimated cost of 31 for instruction:   %r244 = uitofp <16 x i16> undef to <16 x double>
533  %r244 = uitofp <16 x i16> undef to <16 x double>
534  ; CHECK:  Found an estimated cost of 31 for instruction:   %r245 = sitofp <16 x i16> undef to <16 x double>
535  %r245 = sitofp <16 x i16> undef to <16 x double>
536  ; CHECK:  Found an estimated cost of 31 for instruction:   %r246 = uitofp <16 x i16> undef to <16 x double>
537  %r246 = uitofp <16 x i16> undef to <16 x double>
538  ; CHECK:  Found an estimated cost of 31 for instruction:   %r247 = sitofp <16 x i16> undef to <16 x double>
539  %r247 = sitofp <16 x i16> undef to <16 x double>
540  ; CHECK:   Found an estimated cost of 199 for instruction:   %r248 = uitofp <16 x i64> undef to <16 x double>
541  %r248 = uitofp <16 x i64> undef to <16 x double>
542  ; CHECK:   Found an estimated cost of 199 for instruction:   %r249 = sitofp <16 x i64> undef to <16 x double>
543  %r249 = sitofp <16 x i64> undef to <16 x double>
544
545  ; CHECK:   Found an estimated cost of 0 for instruction:   ret i32 undef
546  ret i32 undef
547}
548
549