xref: /llvm-project/llvm/test/Analysis/CostModel/X86/uitofp.ll (revision 4455c5cdeab74a76c47a521e9b7377342c594ab8)
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
8;
9; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mcpu=slm | FileCheck %s --check-prefixes=SSE42
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
12
13define i32 @uitofp_i8_double() {
14; SSE2-LABEL: 'uitofp_i8_double'
15; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_i8_f64 = uitofp i8 undef to double
16; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double>
17; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double>
18; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double>
19; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
20;
21; SSE42-LABEL: 'uitofp_i8_double'
22; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i8_f64 = uitofp i8 undef to double
23; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double>
24; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double>
25; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double>
26; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
27;
28; AVX1-LABEL: 'uitofp_i8_double'
29; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i8_f64 = uitofp i8 undef to double
30; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double>
31; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double>
32; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double>
33; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
34;
35; AVX2-LABEL: 'uitofp_i8_double'
36; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i8_f64 = uitofp i8 undef to double
37; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double>
38; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double>
39; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double>
40; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
41;
42; AVX512-LABEL: 'uitofp_i8_double'
43; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i8_f64 = uitofp i8 undef to double
44; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double>
45; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double>
46; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double>
47; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
48;
49  %cvt_i8_f64 = uitofp i8 undef to double
50  %cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double>
51  %cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double>
52  %cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double>
53  ret i32 undef
54}
55
56define i32 @uitofp_i16_double() {
57; SSE2-LABEL: 'uitofp_i16_double'
58; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_i16_f64 = uitofp i16 undef to double
59; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double>
60; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double>
61; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double>
62; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
63;
64; SSE42-LABEL: 'uitofp_i16_double'
65; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i16_f64 = uitofp i16 undef to double
66; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double>
67; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double>
68; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double>
69; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
70;
71; AVX1-LABEL: 'uitofp_i16_double'
72; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i16_f64 = uitofp i16 undef to double
73; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double>
74; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double>
75; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double>
76; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
77;
78; AVX2-LABEL: 'uitofp_i16_double'
79; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i16_f64 = uitofp i16 undef to double
80; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double>
81; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double>
82; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double>
83; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
84;
85; AVX512-LABEL: 'uitofp_i16_double'
86; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i16_f64 = uitofp i16 undef to double
87; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double>
88; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double>
89; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double>
90; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
91;
92  %cvt_i16_f64 = uitofp i16 undef to double
93  %cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double>
94  %cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double>
95  %cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double>
96  ret i32 undef
97}
98
99define i32 @uitofp_i32_double() {
100; SSE2-LABEL: 'uitofp_i32_double'
101; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %cvt_i32_f64 = uitofp i32 undef to double
102; SSE2-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double>
103; SSE2-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double>
104; SSE2-NEXT:  Cost Model: Found an estimated cost of 28 for instruction: %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double>
105; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
106;
107; SSE42-LABEL: 'uitofp_i32_double'
108; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = uitofp i32 undef to double
109; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double>
110; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double>
111; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double>
112; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
113;
114; AVX1-LABEL: 'uitofp_i32_double'
115; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = uitofp i32 undef to double
116; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double>
117; AVX1-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double>
118; AVX1-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double>
119; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
120;
121; AVX2-LABEL: 'uitofp_i32_double'
122; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = uitofp i32 undef to double
123; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double>
124; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double>
125; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double>
126; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
127;
128; AVX512-LABEL: 'uitofp_i32_double'
129; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f64 = uitofp i32 undef to double
130; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double>
131; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double>
132; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double>
133; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
134;
135  %cvt_i32_f64 = uitofp i32 undef to double
136  %cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double>
137  %cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double>
138  %cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double>
139  ret i32 undef
140}
141
142define i32 @uitofp_i64_double() {
143; SSE2-LABEL: 'uitofp_i64_double'
144; SSE2-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %cvt_i64_f64 = uitofp i64 undef to double
145; SSE2-NEXT:  Cost Model: Found an estimated cost of 15 for instruction: %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double>
146; SSE2-NEXT:  Cost Model: Found an estimated cost of 30 for instruction: %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double>
147; SSE2-NEXT:  Cost Model: Found an estimated cost of 60 for instruction: %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double>
148; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
149;
150; SSE42-LABEL: 'uitofp_i64_double'
151; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_i64_f64 = uitofp i64 undef to double
152; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double>
153; SSE42-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double>
154; SSE42-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double>
155; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
156;
157; AVX-LABEL: 'uitofp_i64_double'
158; AVX-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_i64_f64 = uitofp i64 undef to double
159; AVX-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double>
160; AVX-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double>
161; AVX-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double>
162; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
163;
164; AVX512F-LABEL: 'uitofp_i64_double'
165; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = uitofp i64 undef to double
166; AVX512F-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double>
167; AVX512F-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double>
168; AVX512F-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double>
169; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
170;
171; AVX512DQ-LABEL: 'uitofp_i64_double'
172; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = uitofp i64 undef to double
173; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double>
174; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double>
175; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double>
176; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
177;
178  %cvt_i64_f64 = uitofp i64 undef to double
179  %cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double>
180  %cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double>
181  %cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double>
182  ret i32 undef
183}
184
185define i32 @uitofp_i8_float() {
186; SSE2-LABEL: 'uitofp_i8_float'
187; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_i8_f32 = uitofp i8 undef to float
188; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i8_v2f32 = uitofp <2 x i8> undef to <2 x float>
189; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float>
190; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float>
191; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float>
192; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
193;
194; SSE42-LABEL: 'uitofp_i8_float'
195; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i8_f32 = uitofp i8 undef to float
196; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i8_v2f32 = uitofp <2 x i8> undef to <2 x float>
197; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float>
198; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float>
199; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float>
200; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
201;
202; AVX1-LABEL: 'uitofp_i8_float'
203; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i8_f32 = uitofp i8 undef to float
204; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i8_v2f32 = uitofp <2 x i8> undef to <2 x float>
205; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float>
206; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float>
207; AVX1-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float>
208; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
209;
210; AVX2-LABEL: 'uitofp_i8_float'
211; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i8_f32 = uitofp i8 undef to float
212; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i8_v2f32 = uitofp <2 x i8> undef to <2 x float>
213; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float>
214; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float>
215; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float>
216; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
217;
218; AVX512-LABEL: 'uitofp_i8_float'
219; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i8_f32 = uitofp i8 undef to float
220; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i8_v2f32 = uitofp <2 x i8> undef to <2 x float>
221; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float>
222; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float>
223; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float>
224; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
225;
226  %cvt_i8_f32 = uitofp i8 undef to float
227  %cvt_v2i8_v2f32 = uitofp <2 x i8> undef to <2 x float>
228  %cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float>
229  %cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float>
230  %cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float>
231  ret i32 undef
232}
233
234define i32 @uitofp_i16_float() {
235; SSE2-LABEL: 'uitofp_i16_float'
236; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_i16_f32 = uitofp i16 undef to float
237; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i16_v2f32 = uitofp <2 x i16> undef to <2 x float>
238; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float>
239; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float>
240; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float>
241; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
242;
243; SSE42-LABEL: 'uitofp_i16_float'
244; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i16_f32 = uitofp i16 undef to float
245; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i16_v2f32 = uitofp <2 x i16> undef to <2 x float>
246; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float>
247; SSE42-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float>
248; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float>
249; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
250;
251; AVX1-LABEL: 'uitofp_i16_float'
252; AVX1-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i16_f32 = uitofp i16 undef to float
253; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i16_v2f32 = uitofp <2 x i16> undef to <2 x float>
254; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float>
255; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float>
256; AVX1-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float>
257; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
258;
259; AVX2-LABEL: 'uitofp_i16_float'
260; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i16_f32 = uitofp i16 undef to float
261; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i16_v2f32 = uitofp <2 x i16> undef to <2 x float>
262; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float>
263; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float>
264; AVX2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float>
265; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
266;
267; AVX512-LABEL: 'uitofp_i16_float'
268; AVX512-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_i16_f32 = uitofp i16 undef to float
269; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i16_v2f32 = uitofp <2 x i16> undef to <2 x float>
270; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float>
271; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float>
272; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float>
273; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
274;
275  %cvt_i16_f32 = uitofp i16 undef to float
276  %cvt_v2i16_v2f32 = uitofp <2 x i16> undef to <2 x float>
277  %cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float>
278  %cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float>
279  %cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float>
280  ret i32 undef
281}
282
283define i32 @uitofp_i32_float() {
284; SSE2-LABEL: 'uitofp_i32_float'
285; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %cvt_i32_f32 = uitofp i32 undef to float
286; SSE2-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %cvt_v2i32_v2f32 = uitofp <2 x i32> undef to <2 x float>
287; SSE2-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float>
288; SSE2-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float>
289; SSE2-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float>
290; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
291;
292; SSE42-LABEL: 'uitofp_i32_float'
293; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = uitofp i32 undef to float
294; SSE42-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %cvt_v2i32_v2f32 = uitofp <2 x i32> undef to <2 x float>
295; SSE42-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float>
296; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float>
297; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float>
298; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
299;
300; AVX1-LABEL: 'uitofp_i32_float'
301; AVX1-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = uitofp i32 undef to float
302; AVX1-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v2i32_v2f32 = uitofp <2 x i32> undef to <2 x float>
303; AVX1-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float>
304; AVX1-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float>
305; AVX1-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float>
306; AVX1-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
307;
308; AVX2-LABEL: 'uitofp_i32_float'
309; AVX2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = uitofp i32 undef to float
310; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v2i32_v2f32 = uitofp <2 x i32> undef to <2 x float>
311; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float>
312; AVX2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float>
313; AVX2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float>
314; AVX2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
315;
316; AVX512-LABEL: 'uitofp_i32_float'
317; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i32_f32 = uitofp i32 undef to float
318; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i32_v2f32 = uitofp <2 x i32> undef to <2 x float>
319; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float>
320; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float>
321; AVX512-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float>
322; AVX512-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
323;
324  %cvt_i32_f32 = uitofp i32 undef to float
325  %cvt_v2i32_v2f32 = uitofp <2 x i32> undef to <2 x float>
326  %cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float>
327  %cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float>
328  %cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float>
329  ret i32 undef
330}
331
332define i32 @uitofp_i64_float() {
333; SSE2-LABEL: 'uitofp_i64_float'
334; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cvt_i64_f32 = uitofp i64 undef to float
335; SSE2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float>
336; SSE2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float>
337; SSE2-NEXT:  Cost Model: Found an estimated cost of 72 for instruction: %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float>
338; SSE2-NEXT:  Cost Model: Found an estimated cost of 144 for instruction: %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float>
339; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
340;
341; SSE42-LABEL: 'uitofp_i64_float'
342; SSE42-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_i64_f32 = uitofp i64 undef to float
343; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float>
344; SSE42-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float>
345; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float>
346; SSE42-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float>
347; SSE42-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
348;
349; AVX-LABEL: 'uitofp_i64_float'
350; AVX-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %cvt_i64_f32 = uitofp i64 undef to float
351; AVX-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float>
352; AVX-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float>
353; AVX-NEXT:  Cost Model: Found an estimated cost of 37 for instruction: %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float>
354; AVX-NEXT:  Cost Model: Found an estimated cost of 74 for instruction: %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float>
355; AVX-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
356;
357; AVX512F-LABEL: 'uitofp_i64_float'
358; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = uitofp i64 undef to float
359; AVX512F-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float>
360; AVX512F-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float>
361; AVX512F-NEXT:  Cost Model: Found an estimated cost of 26 for instruction: %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float>
362; AVX512F-NEXT:  Cost Model: Found an estimated cost of 53 for instruction: %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float>
363; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
364;
365; AVX512DQ-LABEL: 'uitofp_i64_float'
366; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f32 = uitofp i64 undef to float
367; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float>
368; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float>
369; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float>
370; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float>
371; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
372;
373  %cvt_i64_f32 = uitofp i64 undef to float
374  %cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float>
375  %cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float>
376  %cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float>
377  %cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float>
378  ret i32 undef
379}
380