1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse2 | FileCheck %s --check-prefixes=SSE2
3 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE42
4 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1
5 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2
6 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F
7 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=AVX512,AVX512DQ
9 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=SLM
10 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mcpu=goldmont | FileCheck %s --check-prefixes=SSE42
11 ; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mcpu=btver2 | FileCheck %s --check-prefixes=AVX,AVX1
13 define i32 @fptoui_double_i64(i32 %arg) {
14 ; SSE2-LABEL: 'fptoui_double_i64'
15 ; SSE2-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %I64 = fptoui double undef to i64
16 ; SSE2-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64>
17 ; SSE2-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64>
18 ; SSE2-NEXT: Cost Model: Found an estimated cost of 144 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64>
19 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
21 ; SSE42-LABEL: 'fptoui_double_i64'
22 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui double undef to i64
23 ; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64>
24 ; SSE42-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64>
25 ; SSE42-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64>
26 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
28 ; AVX1-LABEL: 'fptoui_double_i64'
29 ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui double undef to i64
30 ; AVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64>
31 ; AVX1-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64>
32 ; AVX1-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64>
33 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
35 ; AVX2-LABEL: 'fptoui_double_i64'
36 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %I64 = fptoui double undef to i64
37 ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64>
38 ; AVX2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64>
39 ; AVX2-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64>
40 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
42 ; AVX512F-LABEL: 'fptoui_double_i64'
43 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptoui double undef to i64
44 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64>
45 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64>
46 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64>
47 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
49 ; AVX512DQ-LABEL: 'fptoui_double_i64'
50 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptoui double undef to i64
51 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64>
52 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64>
53 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64>
54 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
56 ; SLM-LABEL: 'fptoui_double_i64'
57 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui double undef to i64
58 ; SLM-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %V2I64 = fptoui <2 x double> undef to <2 x i64>
59 ; SLM-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %V4I64 = fptoui <4 x double> undef to <4 x i64>
60 ; SLM-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %V8I64 = fptoui <8 x double> undef to <8 x i64>
61 ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
63 %I64 = fptoui double undef to i64
64 %V2I64 = fptoui <2 x double> undef to <2 x i64>
65 %V4I64 = fptoui <4 x double> undef to <4 x i64>
66 %V8I64 = fptoui <8 x double> undef to <8 x i64>
70 define i32 @fptoui_double_i32(i32 %arg) {
71 ; SSE2-LABEL: 'fptoui_double_i32'
72 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = fptoui double undef to i32
73 ; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32>
74 ; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
75 ; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32>
76 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
78 ; SSE42-LABEL: 'fptoui_double_i32'
79 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32
80 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32>
81 ; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
82 ; SSE42-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32>
83 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
85 ; AVX1-LABEL: 'fptoui_double_i32'
86 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32
87 ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32>
88 ; AVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
89 ; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32>
90 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
92 ; AVX2-LABEL: 'fptoui_double_i32'
93 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32
94 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32>
95 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
96 ; AVX2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32>
97 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
99 ; AVX512-LABEL: 'fptoui_double_i32'
100 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32
101 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32>
102 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
103 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32>
104 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
106 ; SLM-LABEL: 'fptoui_double_i32'
107 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32
108 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32>
109 ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
110 ; SLM-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32>
111 ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
113 %I32 = fptoui double undef to i32
114 %V2I32 = fptoui <2 x double> undef to <2 x i32>
115 %V4I32 = fptoui <4 x double> undef to <4 x i32>
116 %V8I32 = fptoui <8 x double> undef to <8 x i32>
120 define i32 @fptoui_double_i16(i32 %arg) {
121 ; SSE2-LABEL: 'fptoui_double_i16'
122 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = fptoui double undef to i16
123 ; SSE2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V2I16 = fptoui <2 x double> undef to <2 x i16>
124 ; SSE2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V4I16 = fptoui <4 x double> undef to <4 x i16>
125 ; SSE2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V8I16 = fptoui <8 x double> undef to <8 x i16>
126 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
128 ; SSE42-LABEL: 'fptoui_double_i16'
129 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui double undef to i16
130 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x double> undef to <2 x i16>
131 ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptoui <4 x double> undef to <4 x i16>
132 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I16 = fptoui <8 x double> undef to <8 x i16>
133 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
135 ; AVX-LABEL: 'fptoui_double_i16'
136 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui double undef to i16
137 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x double> undef to <2 x i16>
138 ; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptoui <4 x double> undef to <4 x i16>
139 ; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I16 = fptoui <8 x double> undef to <8 x i16>
140 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
142 ; AVX512-LABEL: 'fptoui_double_i16'
143 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui double undef to i16
144 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x double> undef to <2 x i16>
145 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptoui <4 x double> undef to <4 x i16>
146 ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I16 = fptoui <8 x double> undef to <8 x i16>
147 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
149 ; SLM-LABEL: 'fptoui_double_i16'
150 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui double undef to i16
151 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x double> undef to <2 x i16>
152 ; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I16 = fptoui <4 x double> undef to <4 x i16>
153 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I16 = fptoui <8 x double> undef to <8 x i16>
154 ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
156 %I16 = fptoui double undef to i16
157 %V2I16 = fptoui <2 x double> undef to <2 x i16>
158 %V4I16 = fptoui <4 x double> undef to <4 x i16>
159 %V8I16 = fptoui <8 x double> undef to <8 x i16>
163 define i32 @fptoui_double_i8(i32 %arg) {
164 ; SSE2-LABEL: 'fptoui_double_i8'
165 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = fptoui double undef to i8
166 ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptoui <2 x double> undef to <2 x i8>
167 ; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I8 = fptoui <4 x double> undef to <4 x i8>
168 ; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8I8 = fptoui <8 x double> undef to <8 x i8>
169 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
171 ; SSE42-LABEL: 'fptoui_double_i8'
172 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui double undef to i8
173 ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptoui <2 x double> undef to <2 x i8>
174 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4I8 = fptoui <4 x double> undef to <4 x i8>
175 ; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V8I8 = fptoui <8 x double> undef to <8 x i8>
176 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
178 ; AVX-LABEL: 'fptoui_double_i8'
179 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui double undef to i8
180 ; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptoui <2 x double> undef to <2 x i8>
181 ; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptoui <4 x double> undef to <4 x i8>
182 ; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I8 = fptoui <8 x double> undef to <8 x i8>
183 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
185 ; AVX512-LABEL: 'fptoui_double_i8'
186 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui double undef to i8
187 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptoui <2 x double> undef to <2 x i8>
188 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptoui <4 x double> undef to <4 x i8>
189 ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I8 = fptoui <8 x double> undef to <8 x i8>
190 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
192 ; SLM-LABEL: 'fptoui_double_i8'
193 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui double undef to i8
194 ; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptoui <2 x double> undef to <2 x i8>
195 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4I8 = fptoui <4 x double> undef to <4 x i8>
196 ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V8I8 = fptoui <8 x double> undef to <8 x i8>
197 ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
199 %I8 = fptoui double undef to i8
200 %V2I8 = fptoui <2 x double> undef to <2 x i8>
201 %V4I8 = fptoui <4 x double> undef to <4 x i8>
202 %V8I8 = fptoui <8 x double> undef to <8 x i8>
206 define i32 @fptoui_float_i64(i32 %arg) {
207 ; SSE2-LABEL: 'fptoui_float_i64'
208 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui float undef to i64
209 ; SSE2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64>
210 ; SSE2-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64>
211 ; SSE2-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64>
212 ; SSE2-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64>
213 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
215 ; SSE42-LABEL: 'fptoui_float_i64'
216 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui float undef to i64
217 ; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64>
218 ; SSE42-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64>
219 ; SSE42-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64>
220 ; SSE42-NEXT: Cost Model: Found an estimated cost of 100 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64>
221 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
223 ; AVX1-LABEL: 'fptoui_float_i64'
224 ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui float undef to i64
225 ; AVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64>
226 ; AVX1-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64>
227 ; AVX1-NEXT: Cost Model: Found an estimated cost of 53 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64>
228 ; AVX1-NEXT: Cost Model: Found an estimated cost of 106 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64>
229 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
231 ; AVX2-LABEL: 'fptoui_float_i64'
232 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %I64 = fptoui float undef to i64
233 ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64>
234 ; AVX2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64>
235 ; AVX2-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64>
236 ; AVX2-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64>
237 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
239 ; AVX512F-LABEL: 'fptoui_float_i64'
240 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptoui float undef to i64
241 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64>
242 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64>
243 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64>
244 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 61 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64>
245 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
247 ; AVX512DQ-LABEL: 'fptoui_float_i64'
248 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = fptoui float undef to i64
249 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64>
250 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64>
251 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64>
252 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64>
253 ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
255 ; SLM-LABEL: 'fptoui_float_i64'
256 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = fptoui float undef to i64
257 ; SLM-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %V2I64 = fptoui <2 x float> undef to <2 x i64>
258 ; SLM-NEXT: Cost Model: Found an estimated cost of 37 for instruction: %V4I64 = fptoui <4 x float> undef to <4 x i64>
259 ; SLM-NEXT: Cost Model: Found an estimated cost of 74 for instruction: %V8I64 = fptoui <8 x float> undef to <8 x i64>
260 ; SLM-NEXT: Cost Model: Found an estimated cost of 148 for instruction: %V16I64 = fptoui <16 x float> undef to <16 x i64>
261 ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
263 %I64 = fptoui float undef to i64
264 %V2I64 = fptoui <2 x float> undef to <2 x i64>
265 %V4I64 = fptoui <4 x float> undef to <4 x i64>
266 %V8I64 = fptoui <8 x float> undef to <8 x i64>
267 %V16I64 = fptoui <16 x float> undef to <16 x i64>
271 define i32 @fptoui_float_i32(i32 %arg) {
272 ; SSE2-LABEL: 'fptoui_float_i32'
273 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = fptoui float undef to i32
274 ; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2I32 = fptoui <2 x float> undef to <2 x i32>
275 ; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I32 = fptoui <4 x float> undef to <4 x i32>
276 ; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I32 = fptoui <8 x float> undef to <8 x i32>
277 ; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I32 = fptoui <16 x float> undef to <16 x i32>
278 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
280 ; SSE42-LABEL: 'fptoui_float_i32'
281 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui float undef to i32
282 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = fptoui <2 x float> undef to <2 x i32>
283 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4I32 = fptoui <4 x float> undef to <4 x i32>
284 ; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V8I32 = fptoui <8 x float> undef to <8 x i32>
285 ; SSE42-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V16I32 = fptoui <16 x float> undef to <16 x i32>
286 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
288 ; AVX1-LABEL: 'fptoui_float_i32'
289 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui float undef to i32
290 ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I32 = fptoui <2 x float> undef to <2 x i32>
291 ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I32 = fptoui <4 x float> undef to <4 x i32>
292 ; AVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8I32 = fptoui <8 x float> undef to <8 x i32>
293 ; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V16I32 = fptoui <16 x float> undef to <16 x i32>
294 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
296 ; AVX2-LABEL: 'fptoui_float_i32'
297 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui float undef to i32
298 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I32 = fptoui <2 x float> undef to <2 x i32>
299 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I32 = fptoui <4 x float> undef to <4 x i32>
300 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I32 = fptoui <8 x float> undef to <8 x i32>
301 ; AVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V16I32 = fptoui <16 x float> undef to <16 x i32>
302 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
304 ; AVX512-LABEL: 'fptoui_float_i32'
305 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui float undef to i32
306 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptoui <2 x float> undef to <2 x i32>
307 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptoui <4 x float> undef to <4 x i32>
308 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptoui <8 x float> undef to <8 x i32>
309 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = fptoui <16 x float> undef to <16 x i32>
310 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
312 ; SLM-LABEL: 'fptoui_float_i32'
313 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui float undef to i32
314 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = fptoui <2 x float> undef to <2 x i32>
315 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4I32 = fptoui <4 x float> undef to <4 x i32>
316 ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V8I32 = fptoui <8 x float> undef to <8 x i32>
317 ; SLM-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V16I32 = fptoui <16 x float> undef to <16 x i32>
318 ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
320 %I32 = fptoui float undef to i32
321 %V2I32 = fptoui <2 x float> undef to <2 x i32>
322 %V4I32 = fptoui <4 x float> undef to <4 x i32>
323 %V8I32 = fptoui <8 x float> undef to <8 x i32>
324 %V16I32 = fptoui <16 x float> undef to <16 x i32>
328 define i32 @fptoui_float_i16(i32 %arg) {
329 ; SSE2-LABEL: 'fptoui_float_i16'
330 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = fptoui float undef to i16
331 ; SSE2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V2I16 = fptoui <2 x float> undef to <2 x i16>
332 ; SSE2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V4I16 = fptoui <4 x float> undef to <4 x i16>
333 ; SSE2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V8I16 = fptoui <8 x float> undef to <8 x i16>
334 ; SSE2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V16I16 = fptoui <16 x float> undef to <16 x i16>
335 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
337 ; SSE42-LABEL: 'fptoui_float_i16'
338 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui float undef to i16
339 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x float> undef to <2 x i16>
340 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptoui <4 x float> undef to <4 x i16>
341 ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptoui <8 x float> undef to <8 x i16>
342 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I16 = fptoui <16 x float> undef to <16 x i16>
343 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
345 ; AVX1-LABEL: 'fptoui_float_i16'
346 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui float undef to i16
347 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x float> undef to <2 x i16>
348 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptoui <4 x float> undef to <4 x i16>
349 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptoui <8 x float> undef to <8 x i16>
350 ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I16 = fptoui <16 x float> undef to <16 x i16>
351 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
353 ; AVX2-LABEL: 'fptoui_float_i16'
354 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui float undef to i16
355 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x float> undef to <2 x i16>
356 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptoui <4 x float> undef to <4 x i16>
357 ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptoui <8 x float> undef to <8 x i16>
358 ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I16 = fptoui <16 x float> undef to <16 x i16>
359 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
361 ; AVX512-LABEL: 'fptoui_float_i16'
362 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui float undef to i16
363 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x float> undef to <2 x i16>
364 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptoui <4 x float> undef to <4 x i16>
365 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptoui <8 x float> undef to <8 x i16>
366 ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I16 = fptoui <16 x float> undef to <16 x i16>
367 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
369 ; SLM-LABEL: 'fptoui_float_i16'
370 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = fptoui float undef to i16
371 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I16 = fptoui <2 x float> undef to <2 x i16>
372 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I16 = fptoui <4 x float> undef to <4 x i16>
373 ; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I16 = fptoui <8 x float> undef to <8 x i16>
374 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I16 = fptoui <16 x float> undef to <16 x i16>
375 ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
377 %I16 = fptoui float undef to i16
378 %V2I16 = fptoui <2 x float> undef to <2 x i16>
379 %V4I16 = fptoui <4 x float> undef to <4 x i16>
380 %V8I16 = fptoui <8 x float> undef to <8 x i16>
381 %V16I16 = fptoui <16 x float> undef to <16 x i16>
385 define i32 @fptoui_float_i8(i32 %arg) {
386 ; SSE2-LABEL: 'fptoui_float_i8'
387 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = fptoui float undef to i8
388 ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2I8 = fptoui <2 x float> undef to <2 x i8>
389 ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V4I8 = fptoui <4 x float> undef to <4 x i8>
390 ; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V8I8 = fptoui <8 x float> undef to <8 x i8>
391 ; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V16I8 = fptoui <16 x float> undef to <16 x i8>
392 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
394 ; SSE42-LABEL: 'fptoui_float_i8'
395 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui float undef to i8
396 ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptoui <2 x float> undef to <2 x i8>
397 ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptoui <4 x float> undef to <4 x i8>
398 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I8 = fptoui <8 x float> undef to <8 x i8>
399 ; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V16I8 = fptoui <16 x float> undef to <16 x i8>
400 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
402 ; AVX-LABEL: 'fptoui_float_i8'
403 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui float undef to i8
404 ; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptoui <2 x float> undef to <2 x i8>
405 ; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptoui <4 x float> undef to <4 x i8>
406 ; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I8 = fptoui <8 x float> undef to <8 x i8>
407 ; AVX-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I8 = fptoui <16 x float> undef to <16 x i8>
408 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
410 ; AVX512-LABEL: 'fptoui_float_i8'
411 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui float undef to i8
412 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptoui <2 x float> undef to <2 x i8>
413 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptoui <4 x float> undef to <4 x i8>
414 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I8 = fptoui <8 x float> undef to <8 x i8>
415 ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I8 = fptoui <16 x float> undef to <16 x i8>
416 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
418 ; SLM-LABEL: 'fptoui_float_i8'
419 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = fptoui float undef to i8
420 ; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = fptoui <2 x float> undef to <2 x i8>
421 ; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I8 = fptoui <4 x float> undef to <4 x i8>
422 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I8 = fptoui <8 x float> undef to <8 x i8>
423 ; SLM-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V16I8 = fptoui <16 x float> undef to <16 x i8>
424 ; SLM-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
426 %I8 = fptoui float undef to i8
427 %V2I8 = fptoui <2 x float> undef to <2 x i8>
428 %V4I8 = fptoui <4 x float> undef to <4 x i8>
429 %V8I8 = fptoui <8 x float> undef to <8 x i8>
430 %V16I8 = fptoui <16 x float> undef to <16 x i8>