xref: /llvm-project/llvm/test/Analysis/CostModel/AMDGPU/cast.ll (revision e39f6c1844fab59c638d8059a6cf139adb42279a)
1a2120f6bSDaniil Fukalov; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
24178e334SSimon Pilgrim; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx1010 < %s | FileCheck -check-prefixes=ALL,FAST %s
34178e334SSimon Pilgrim; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx90a < %s | FileCheck -check-prefixes=ALL,FAST %s
44178e334SSimon Pilgrim; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefixes=ALL,FAST %s
54178e334SSimon Pilgrim; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa < %s | FileCheck -check-prefixes=ALL,SLOW %s
6a2120f6bSDaniil Fukalov
74178e334SSimon Pilgrim; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx1010 < %s | FileCheck -check-prefixes=ALL-SIZE,FAST-SIZE %s
84178e334SSimon Pilgrim; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx90a < %s | FileCheck -check-prefixes=ALL-SIZE,FAST-SIZE %s
94178e334SSimon Pilgrim; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefixes=ALL-SIZE,FAST-SIZE %s
104178e334SSimon Pilgrim; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa < %s | FileCheck -check-prefixes=ALL-SIZE,SLOW-SIZE %s
11a2120f6bSDaniil Fukalov; END.
12a2120f6bSDaniil Fukalov
13a2120f6bSDaniil Fukalovdefine i32 @add(i32 %arg) {
14a2120f6bSDaniil Fukalov  ; -- Same size registeres --
15a2120f6bSDaniil Fukalov; ALL-LABEL: 'add'
16a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A = zext <4 x i1> undef to <4 x i32>
17a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B = sext <4 x i1> undef to <4 x i32>
18a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C = trunc <4 x i32> undef to <4 x i1>
19a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D = zext <8 x i1> undef to <8 x i32>
20a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %E = sext <8 x i1> undef to <8 x i32>
21a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %F = trunc <8 x i32> undef to <8 x i1>
22a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %G = zext i1 undef to i32
23a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %H = trunc i32 undef to i1
24a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
25a2120f6bSDaniil Fukalov;
26a2120f6bSDaniil Fukalov; ALL-SIZE-LABEL: 'add'
27a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A = zext <4 x i1> undef to <4 x i32>
28a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B = sext <4 x i1> undef to <4 x i32>
29a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C = trunc <4 x i32> undef to <4 x i1>
30a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D = zext <8 x i1> undef to <8 x i32>
31a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %E = sext <8 x i1> undef to <8 x i32>
32a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %F = trunc <8 x i32> undef to <8 x i1>
33a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %G = zext i1 undef to i32
34a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %H = trunc i32 undef to i1
35a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
36a2120f6bSDaniil Fukalov;
37a2120f6bSDaniil Fukalov  %A = zext <4 x i1> undef to <4 x i32>
38a2120f6bSDaniil Fukalov  %B = sext <4 x i1> undef to <4 x i32>
39a2120f6bSDaniil Fukalov  %C = trunc <4 x i32> undef to <4 x i1>
40a2120f6bSDaniil Fukalov
41a2120f6bSDaniil Fukalov  ; -- Different size registers --
42a2120f6bSDaniil Fukalov  %D = zext <8 x i1> undef to <8 x i32>
43a2120f6bSDaniil Fukalov  %E = sext <8 x i1> undef to <8 x i32>
44a2120f6bSDaniil Fukalov  %F = trunc <8 x i32> undef to <8 x i1>
45a2120f6bSDaniil Fukalov
46a2120f6bSDaniil Fukalov  ; -- scalars --
47a2120f6bSDaniil Fukalov  %G = zext i1 undef to i32
48a2120f6bSDaniil Fukalov  %H = trunc i32 undef to i1
49a2120f6bSDaniil Fukalov
50a2120f6bSDaniil Fukalov  ret i32 undef
51a2120f6bSDaniil Fukalov}
52a2120f6bSDaniil Fukalov
53a2120f6bSDaniil Fukalovdefine i32 @zext_sext(<8 x i1> %in) {
54a2120f6bSDaniil Fukalov; FAST-LABEL: 'zext_sext'
55a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %Z = zext <8 x i1> %in to <8 x i32>
56a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %S = sext <8 x i1> %in to <8 x i32>
57a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %A1 = zext <16 x i8> undef to <16 x i16>
58a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %A2 = sext <16 x i8> undef to <16 x i16>
59a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A = sext <8 x i16> undef to <8 x i32>
60a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %B = zext <8 x i16> undef to <8 x i32>
61a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C = sext <4 x i32> undef to <4 x i64>
62a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v8i8.z = zext <8 x i8> undef to <8 x i32>
63a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C.v8i8.s = sext <8 x i8> undef to <8 x i32>
64a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v4i16.z = zext <4 x i16> undef to <4 x i64>
65a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C.v4i16.s = sext <4 x i16> undef to <4 x i64>
66a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v4i8.z = zext <4 x i8> undef to <4 x i64>
67a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C.v4i8.s = sext <4 x i8> undef to <4 x i64>
68a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D = zext <4 x i32> undef to <4 x i64>
69a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D1 = zext <8 x i32> undef to <8 x i64>
70a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D2 = sext <8 x i32> undef to <8 x i64>
71a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D3 = zext <16 x i16> undef to <16 x i32>
72a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D4 = zext <16 x i8> undef to <16 x i32>
73a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %D5 = zext <16 x i1> undef to <16 x i32>
74a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %E = trunc <4 x i64> undef to <4 x i32>
75a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F = trunc <8 x i32> undef to <8 x i16>
76a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F1 = trunc <16 x i16> undef to <16 x i8>
77*e39f6c18SAlex Richardson; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F2 = trunc <8 x i32> undef to <8 x i8>
78*e39f6c18SAlex Richardson; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F3 = trunc <4 x i64> undef to <4 x i8>
79a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G = trunc <8 x i64> undef to <8 x i32>
80a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G1 = trunc <16 x i32> undef to <16 x i16>
81*e39f6c18SAlex Richardson; FAST-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G2 = trunc <16 x i32> undef to <16 x i8>
82a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
83a2120f6bSDaniil Fukalov;
84a2120f6bSDaniil Fukalov; SLOW-LABEL: 'zext_sext'
85a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %Z = zext <8 x i1> %in to <8 x i32>
86a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %S = sext <8 x i1> %in to <8 x i32>
87a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %A1 = zext <16 x i8> undef to <16 x i16>
88a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %A2 = sext <16 x i8> undef to <16 x i16>
89a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A = sext <8 x i16> undef to <8 x i32>
90a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %B = zext <8 x i16> undef to <8 x i32>
91a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C = sext <4 x i32> undef to <4 x i64>
92a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C.v8i8.z = zext <8 x i8> undef to <8 x i32>
93a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C.v8i8.s = sext <8 x i8> undef to <8 x i32>
94a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v4i16.z = zext <4 x i16> undef to <4 x i64>
95a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C.v4i16.s = sext <4 x i16> undef to <4 x i64>
96a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v4i8.z = zext <4 x i8> undef to <4 x i64>
97a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C.v4i8.s = sext <4 x i8> undef to <4 x i64>
98a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D = zext <4 x i32> undef to <4 x i64>
99a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D1 = zext <8 x i32> undef to <8 x i64>
100a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D2 = sext <8 x i32> undef to <8 x i64>
101a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %D3 = zext <16 x i16> undef to <16 x i32>
102a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %D4 = zext <16 x i8> undef to <16 x i32>
103a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %D5 = zext <16 x i1> undef to <16 x i32>
104a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %E = trunc <4 x i64> undef to <4 x i32>
105a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F = trunc <8 x i32> undef to <8 x i16>
106a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F1 = trunc <16 x i16> undef to <16 x i8>
107a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F2 = trunc <8 x i32> undef to <8 x i8>
108a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F3 = trunc <4 x i64> undef to <4 x i8>
109a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G = trunc <8 x i64> undef to <8 x i32>
110a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G1 = trunc <16 x i32> undef to <16 x i16>
111a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G2 = trunc <16 x i32> undef to <16 x i8>
112a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
113a2120f6bSDaniil Fukalov;
114a2120f6bSDaniil Fukalov; FAST-SIZE-LABEL: 'zext_sext'
115a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %Z = zext <8 x i1> %in to <8 x i32>
116a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %S = sext <8 x i1> %in to <8 x i32>
117a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %A1 = zext <16 x i8> undef to <16 x i16>
118a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %A2 = sext <16 x i8> undef to <16 x i16>
119a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A = sext <8 x i16> undef to <8 x i32>
120a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %B = zext <8 x i16> undef to <8 x i32>
121a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C = sext <4 x i32> undef to <4 x i64>
122a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v8i8.z = zext <8 x i8> undef to <8 x i32>
123a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C.v8i8.s = sext <8 x i8> undef to <8 x i32>
124a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v4i16.z = zext <4 x i16> undef to <4 x i64>
125a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C.v4i16.s = sext <4 x i16> undef to <4 x i64>
126a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v4i8.z = zext <4 x i8> undef to <4 x i64>
127a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C.v4i8.s = sext <4 x i8> undef to <4 x i64>
128a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D = zext <4 x i32> undef to <4 x i64>
129a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D1 = zext <8 x i32> undef to <8 x i64>
130a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D2 = sext <8 x i32> undef to <8 x i64>
131a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D3 = zext <16 x i16> undef to <16 x i32>
132a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D4 = zext <16 x i8> undef to <16 x i32>
133a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %D5 = zext <16 x i1> undef to <16 x i32>
134a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %E = trunc <4 x i64> undef to <4 x i32>
135a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F = trunc <8 x i32> undef to <8 x i16>
136a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F1 = trunc <16 x i16> undef to <16 x i8>
137*e39f6c18SAlex Richardson; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F2 = trunc <8 x i32> undef to <8 x i8>
138*e39f6c18SAlex Richardson; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F3 = trunc <4 x i64> undef to <4 x i8>
139a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G = trunc <8 x i64> undef to <8 x i32>
140a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G1 = trunc <16 x i32> undef to <16 x i16>
141*e39f6c18SAlex Richardson; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G2 = trunc <16 x i32> undef to <16 x i8>
142a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
143a2120f6bSDaniil Fukalov;
144a2120f6bSDaniil Fukalov; SLOW-SIZE-LABEL: 'zext_sext'
145a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %Z = zext <8 x i1> %in to <8 x i32>
146a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %S = sext <8 x i1> %in to <8 x i32>
147a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %A1 = zext <16 x i8> undef to <16 x i16>
148a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %A2 = sext <16 x i8> undef to <16 x i16>
149a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A = sext <8 x i16> undef to <8 x i32>
150a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %B = zext <8 x i16> undef to <8 x i32>
151a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C = sext <4 x i32> undef to <4 x i64>
152a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C.v8i8.z = zext <8 x i8> undef to <8 x i32>
153a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C.v8i8.s = sext <8 x i8> undef to <8 x i32>
154a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v4i16.z = zext <4 x i16> undef to <4 x i64>
155a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C.v4i16.s = sext <4 x i16> undef to <4 x i64>
156a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %C.v4i8.z = zext <4 x i8> undef to <4 x i64>
157a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C.v4i8.s = sext <4 x i8> undef to <4 x i64>
158a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D = zext <4 x i32> undef to <4 x i64>
159a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %D1 = zext <8 x i32> undef to <8 x i64>
160a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D2 = sext <8 x i32> undef to <8 x i64>
161a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %D3 = zext <16 x i16> undef to <16 x i32>
162a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %D4 = zext <16 x i8> undef to <16 x i32>
163a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %D5 = zext <16 x i1> undef to <16 x i32>
164a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %E = trunc <4 x i64> undef to <4 x i32>
165a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F = trunc <8 x i32> undef to <8 x i16>
166a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F1 = trunc <16 x i16> undef to <16 x i8>
167a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F2 = trunc <8 x i32> undef to <8 x i8>
168a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %F3 = trunc <4 x i64> undef to <4 x i8>
169a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G = trunc <8 x i64> undef to <8 x i32>
170a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G1 = trunc <16 x i32> undef to <16 x i16>
171a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %G2 = trunc <16 x i32> undef to <16 x i8>
172a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
173a2120f6bSDaniil Fukalov;
174a2120f6bSDaniil Fukalov  %Z = zext <8 x i1> %in to <8 x i32>
175a2120f6bSDaniil Fukalov  %S = sext <8 x i1> %in to <8 x i32>
176a2120f6bSDaniil Fukalov
177a2120f6bSDaniil Fukalov  %A1 = zext <16 x i8> undef to <16 x i16>
178a2120f6bSDaniil Fukalov  %A2 = sext <16 x i8> undef to <16 x i16>
179a2120f6bSDaniil Fukalov  %A = sext <8 x i16> undef to <8 x i32>
180a2120f6bSDaniil Fukalov  %B = zext <8 x i16> undef to <8 x i32>
181a2120f6bSDaniil Fukalov  %C = sext <4 x i32> undef to <4 x i64>
182a2120f6bSDaniil Fukalov
183a2120f6bSDaniil Fukalov  %C.v8i8.z = zext <8 x i8> undef to <8 x i32>
184a2120f6bSDaniil Fukalov  %C.v8i8.s = sext <8 x i8> undef to <8 x i32>
185a2120f6bSDaniil Fukalov  %C.v4i16.z = zext <4 x i16> undef to <4 x i64>
186a2120f6bSDaniil Fukalov  %C.v4i16.s = sext <4 x i16> undef to <4 x i64>
187a2120f6bSDaniil Fukalov
188a2120f6bSDaniil Fukalov  %C.v4i8.z = zext <4 x i8> undef to <4 x i64>
189a2120f6bSDaniil Fukalov  %C.v4i8.s = sext <4 x i8> undef to <4 x i64>
190a2120f6bSDaniil Fukalov
191a2120f6bSDaniil Fukalov  %D = zext <4 x i32> undef to <4 x i64>
192a2120f6bSDaniil Fukalov
193a2120f6bSDaniil Fukalov  %D1 = zext <8 x i32> undef to <8 x i64>
194a2120f6bSDaniil Fukalov
195a2120f6bSDaniil Fukalov  %D2 = sext <8 x i32> undef to <8 x i64>
196a2120f6bSDaniil Fukalov
197a2120f6bSDaniil Fukalov  %D3 = zext <16 x i16> undef to <16 x i32>
198a2120f6bSDaniil Fukalov  %D4 = zext <16 x i8> undef to <16 x i32>
199a2120f6bSDaniil Fukalov  %D5 = zext <16 x i1> undef to <16 x i32>
200a2120f6bSDaniil Fukalov
201a2120f6bSDaniil Fukalov  %E = trunc <4 x i64> undef to <4 x i32>
202a2120f6bSDaniil Fukalov  %F = trunc <8 x i32> undef to <8 x i16>
203a2120f6bSDaniil Fukalov  %F1 = trunc <16 x i16> undef to <16 x i8>
204a2120f6bSDaniil Fukalov  %F2 = trunc <8 x i32> undef to <8 x i8>
205a2120f6bSDaniil Fukalov  %F3 = trunc <4 x i64> undef to <4 x i8>
206a2120f6bSDaniil Fukalov
207a2120f6bSDaniil Fukalov  %G = trunc <8 x i64> undef to <8 x i32>
208a2120f6bSDaniil Fukalov  %G1 = trunc <16 x i32> undef to <16 x i16>
209a2120f6bSDaniil Fukalov  %G2 = trunc <16 x i32> undef to <16 x i8>
210a2120f6bSDaniil Fukalov  ret i32 undef
211a2120f6bSDaniil Fukalov}
212a2120f6bSDaniil Fukalov
213a2120f6bSDaniil Fukalovdefine i32 @masks8(<8 x i1> %in) {
214a2120f6bSDaniil Fukalov; ALL-LABEL: 'masks8'
215a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %Z = zext <8 x i1> %in to <8 x i32>
216a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %S = sext <8 x i1> %in to <8 x i32>
217a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
218a2120f6bSDaniil Fukalov;
219a2120f6bSDaniil Fukalov; ALL-SIZE-LABEL: 'masks8'
220a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %Z = zext <8 x i1> %in to <8 x i32>
221a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %S = sext <8 x i1> %in to <8 x i32>
222a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
223a2120f6bSDaniil Fukalov;
224a2120f6bSDaniil Fukalov  %Z = zext <8 x i1> %in to <8 x i32>
225a2120f6bSDaniil Fukalov  %S = sext <8 x i1> %in to <8 x i32>
226a2120f6bSDaniil Fukalov  ret i32 undef
227a2120f6bSDaniil Fukalov}
228a2120f6bSDaniil Fukalov
229a2120f6bSDaniil Fukalovdefine i32 @masks4(<4 x i1> %in) {
230a2120f6bSDaniil Fukalov; ALL-LABEL: 'masks4'
231a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %Z = zext <4 x i1> %in to <4 x i64>
232a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %S = sext <4 x i1> %in to <4 x i64>
233a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef
234a2120f6bSDaniil Fukalov;
235a2120f6bSDaniil Fukalov; ALL-SIZE-LABEL: 'masks4'
236a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %Z = zext <4 x i1> %in to <4 x i64>
237a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %S = sext <4 x i1> %in to <4 x i64>
238a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef
239a2120f6bSDaniil Fukalov;
240a2120f6bSDaniil Fukalov  %Z = zext <4 x i1> %in to <4 x i64>
241a2120f6bSDaniil Fukalov  %S = sext <4 x i1> %in to <4 x i64>
242a2120f6bSDaniil Fukalov  ret i32 undef
243a2120f6bSDaniil Fukalov}
244a2120f6bSDaniil Fukalov
245a2120f6bSDaniil Fukalovdefine void @sitofp4(<4 x i1> %a, <4 x i8> %b, <4 x i16> %c, <4 x i32> %d) {
246a2120f6bSDaniil Fukalov; FAST-LABEL: 'sitofp4'
247a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = sitofp <4 x i1> %a to <4 x float>
248a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A2 = sitofp <4 x i1> %a to <4 x double>
249a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B1 = sitofp <4 x i8> %b to <4 x float>
250a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B2 = sitofp <4 x i8> %b to <4 x double>
251a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %C1 = sitofp <4 x i16> %c to <4 x float>
252a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C2 = sitofp <4 x i16> %c to <4 x double>
253a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %D1 = sitofp <4 x i32> %d to <4 x float>
254a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %D2 = sitofp <4 x i32> %d to <4 x double>
255a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
256a2120f6bSDaniil Fukalov;
257a2120f6bSDaniil Fukalov; SLOW-LABEL: 'sitofp4'
258a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = sitofp <4 x i1> %a to <4 x float>
259a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A2 = sitofp <4 x i1> %a to <4 x double>
260a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B1 = sitofp <4 x i8> %b to <4 x float>
261a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B2 = sitofp <4 x i8> %b to <4 x double>
262a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C1 = sitofp <4 x i16> %c to <4 x float>
263a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C2 = sitofp <4 x i16> %c to <4 x double>
264a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %D1 = sitofp <4 x i32> %d to <4 x float>
265a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %D2 = sitofp <4 x i32> %d to <4 x double>
266a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
267a2120f6bSDaniil Fukalov;
268a2120f6bSDaniil Fukalov; FAST-SIZE-LABEL: 'sitofp4'
269a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = sitofp <4 x i1> %a to <4 x float>
270a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A2 = sitofp <4 x i1> %a to <4 x double>
271a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B1 = sitofp <4 x i8> %b to <4 x float>
272a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B2 = sitofp <4 x i8> %b to <4 x double>
273a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %C1 = sitofp <4 x i16> %c to <4 x float>
274a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C2 = sitofp <4 x i16> %c to <4 x double>
275a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %D1 = sitofp <4 x i32> %d to <4 x float>
276a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %D2 = sitofp <4 x i32> %d to <4 x double>
277a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
278a2120f6bSDaniil Fukalov;
279a2120f6bSDaniil Fukalov; SLOW-SIZE-LABEL: 'sitofp4'
280a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = sitofp <4 x i1> %a to <4 x float>
281a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A2 = sitofp <4 x i1> %a to <4 x double>
282a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B1 = sitofp <4 x i8> %b to <4 x float>
283a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B2 = sitofp <4 x i8> %b to <4 x double>
284a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C1 = sitofp <4 x i16> %c to <4 x float>
285a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C2 = sitofp <4 x i16> %c to <4 x double>
286a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %D1 = sitofp <4 x i32> %d to <4 x float>
287a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %D2 = sitofp <4 x i32> %d to <4 x double>
288a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
289a2120f6bSDaniil Fukalov;
290a2120f6bSDaniil Fukalov  %A1 = sitofp <4 x i1> %a to <4 x float>
291a2120f6bSDaniil Fukalov  %A2 = sitofp <4 x i1> %a to <4 x double>
292a2120f6bSDaniil Fukalov  %B1 = sitofp <4 x i8> %b to <4 x float>
293a2120f6bSDaniil Fukalov  %B2 = sitofp <4 x i8> %b to <4 x double>
294a2120f6bSDaniil Fukalov  %C1 = sitofp <4 x i16> %c to <4 x float>
295a2120f6bSDaniil Fukalov  %C2 = sitofp <4 x i16> %c to <4 x double>
296a2120f6bSDaniil Fukalov  %D1 = sitofp <4 x i32> %d to <4 x float>
297a2120f6bSDaniil Fukalov  %D2 = sitofp <4 x i32> %d to <4 x double>
298a2120f6bSDaniil Fukalov  ret void
299a2120f6bSDaniil Fukalov}
300a2120f6bSDaniil Fukalov
301a2120f6bSDaniil Fukalovdefine void @sitofp8(<8 x i1> %a, <8 x i8> %b, <8 x i16> %c, <8 x i32> %d) {
302bb1fe369SStanislav Mekhanoshin; ALL-LABEL: 'sitofp8'
303bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A1 = sitofp <8 x i1> %a to <8 x float>
304bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %B1 = sitofp <8 x i8> %b to <8 x float>
305bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C1 = sitofp <8 x i16> %c to <8 x float>
306bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D1 = sitofp <8 x i32> %d to <8 x float>
307bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
308a2120f6bSDaniil Fukalov;
309bb1fe369SStanislav Mekhanoshin; ALL-SIZE-LABEL: 'sitofp8'
310bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A1 = sitofp <8 x i1> %a to <8 x float>
311bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %B1 = sitofp <8 x i8> %b to <8 x float>
312bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C1 = sitofp <8 x i16> %c to <8 x float>
313bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D1 = sitofp <8 x i32> %d to <8 x float>
314bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
315a2120f6bSDaniil Fukalov;
316a2120f6bSDaniil Fukalov  %A1 = sitofp <8 x i1> %a to <8 x float>
317a2120f6bSDaniil Fukalov  %B1 = sitofp <8 x i8> %b to <8 x float>
318a2120f6bSDaniil Fukalov  %C1 = sitofp <8 x i16> %c to <8 x float>
319a2120f6bSDaniil Fukalov  %D1 = sitofp <8 x i32> %d to <8 x float>
320a2120f6bSDaniil Fukalov  ret void
321a2120f6bSDaniil Fukalov}
322a2120f6bSDaniil Fukalov
323a2120f6bSDaniil Fukalovdefine void @uitofp4(<4 x i1> %a, <4 x i8> %b, <4 x i16> %c, <4 x i32> %d) {
324a2120f6bSDaniil Fukalov; FAST-LABEL: 'uitofp4'
325a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = uitofp <4 x i1> %a to <4 x float>
326a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A2 = uitofp <4 x i1> %a to <4 x double>
327a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B1 = uitofp <4 x i8> %b to <4 x float>
328a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B2 = uitofp <4 x i8> %b to <4 x double>
329a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %C1 = uitofp <4 x i16> %c to <4 x float>
330a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C2 = uitofp <4 x i16> %c to <4 x double>
331a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %D1 = uitofp <4 x i32> %d to <4 x float>
332a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %D2 = uitofp <4 x i32> %d to <4 x double>
333a2120f6bSDaniil Fukalov; FAST-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
334a2120f6bSDaniil Fukalov;
335a2120f6bSDaniil Fukalov; SLOW-LABEL: 'uitofp4'
336a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = uitofp <4 x i1> %a to <4 x float>
337a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A2 = uitofp <4 x i1> %a to <4 x double>
338a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B1 = uitofp <4 x i8> %b to <4 x float>
339a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B2 = uitofp <4 x i8> %b to <4 x double>
340a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C1 = uitofp <4 x i16> %c to <4 x float>
341a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C2 = uitofp <4 x i16> %c to <4 x double>
342a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %D1 = uitofp <4 x i32> %d to <4 x float>
343a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %D2 = uitofp <4 x i32> %d to <4 x double>
344a2120f6bSDaniil Fukalov; SLOW-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
345a2120f6bSDaniil Fukalov;
346a2120f6bSDaniil Fukalov; FAST-SIZE-LABEL: 'uitofp4'
347a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = uitofp <4 x i1> %a to <4 x float>
348a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A2 = uitofp <4 x i1> %a to <4 x double>
349a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B1 = uitofp <4 x i8> %b to <4 x float>
350a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B2 = uitofp <4 x i8> %b to <4 x double>
351a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %C1 = uitofp <4 x i16> %c to <4 x float>
352a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C2 = uitofp <4 x i16> %c to <4 x double>
353a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %D1 = uitofp <4 x i32> %d to <4 x float>
354a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %D2 = uitofp <4 x i32> %d to <4 x double>
355a2120f6bSDaniil Fukalov; FAST-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
356a2120f6bSDaniil Fukalov;
357a2120f6bSDaniil Fukalov; SLOW-SIZE-LABEL: 'uitofp4'
358a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = uitofp <4 x i1> %a to <4 x float>
359a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A2 = uitofp <4 x i1> %a to <4 x double>
360a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B1 = uitofp <4 x i8> %b to <4 x float>
361a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %B2 = uitofp <4 x i8> %b to <4 x double>
362a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C1 = uitofp <4 x i16> %c to <4 x float>
363a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %C2 = uitofp <4 x i16> %c to <4 x double>
364a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %D1 = uitofp <4 x i32> %d to <4 x float>
365a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %D2 = uitofp <4 x i32> %d to <4 x double>
366a2120f6bSDaniil Fukalov; SLOW-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
367a2120f6bSDaniil Fukalov;
368a2120f6bSDaniil Fukalov  %A1 = uitofp <4 x i1> %a to <4 x float>
369a2120f6bSDaniil Fukalov  %A2 = uitofp <4 x i1> %a to <4 x double>
370a2120f6bSDaniil Fukalov  %B1 = uitofp <4 x i8> %b to <4 x float>
371a2120f6bSDaniil Fukalov  %B2 = uitofp <4 x i8> %b to <4 x double>
372a2120f6bSDaniil Fukalov  %C1 = uitofp <4 x i16> %c to <4 x float>
373a2120f6bSDaniil Fukalov  %C2 = uitofp <4 x i16> %c to <4 x double>
374a2120f6bSDaniil Fukalov  %D1 = uitofp <4 x i32> %d to <4 x float>
375a2120f6bSDaniil Fukalov  %D2 = uitofp <4 x i32> %d to <4 x double>
376a2120f6bSDaniil Fukalov  ret void
377a2120f6bSDaniil Fukalov}
378a2120f6bSDaniil Fukalov
379a2120f6bSDaniil Fukalovdefine void @uitofp8(<8 x i1> %a, <8 x i8> %b, <8 x i16> %c, <8 x i32> %d) {
380bb1fe369SStanislav Mekhanoshin; ALL-LABEL: 'uitofp8'
381bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A1 = uitofp <8 x i1> %a to <8 x float>
382bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %B1 = uitofp <8 x i8> %b to <8 x float>
383bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C1 = uitofp <8 x i16> %c to <8 x float>
384bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D1 = uitofp <8 x i32> %d to <8 x float>
385bb1fe369SStanislav Mekhanoshin; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
386a2120f6bSDaniil Fukalov;
387bb1fe369SStanislav Mekhanoshin; ALL-SIZE-LABEL: 'uitofp8'
388bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A1 = uitofp <8 x i1> %a to <8 x float>
389bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %B1 = uitofp <8 x i8> %b to <8 x float>
390bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %C1 = uitofp <8 x i16> %c to <8 x float>
391bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %D1 = uitofp <8 x i32> %d to <8 x float>
392bb1fe369SStanislav Mekhanoshin; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
393a2120f6bSDaniil Fukalov;
394a2120f6bSDaniil Fukalov  %A1 = uitofp <8 x i1> %a to <8 x float>
395a2120f6bSDaniil Fukalov  %B1 = uitofp <8 x i8> %b to <8 x float>
396a2120f6bSDaniil Fukalov  %C1 = uitofp <8 x i16> %c to <8 x float>
397a2120f6bSDaniil Fukalov  %D1 = uitofp <8 x i32> %d to <8 x float>
398a2120f6bSDaniil Fukalov  ret void
399a2120f6bSDaniil Fukalov}
400a2120f6bSDaniil Fukalov
401a2120f6bSDaniil Fukalovdefine void @fp_conv(<8 x float> %a, <16 x float>%b, <4 x float> %c) {
402a2120f6bSDaniil Fukalov; ALL-LABEL: 'fp_conv'
403a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = fpext <4 x float> %c to <4 x double>
404a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A2 = fpext <8 x float> %a to <8 x double>
405a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A3 = fptrunc <4 x double> undef to <4 x float>
406a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A4 = fptrunc <8 x double> undef to <8 x float>
407a2120f6bSDaniil Fukalov; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
408a2120f6bSDaniil Fukalov;
409a2120f6bSDaniil Fukalov; ALL-SIZE-LABEL: 'fp_conv'
410a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A1 = fpext <4 x float> %c to <4 x double>
411a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A2 = fpext <8 x float> %a to <8 x double>
412a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %A3 = fptrunc <4 x double> undef to <4 x float>
413a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %A4 = fptrunc <8 x double> undef to <8 x float>
414a2120f6bSDaniil Fukalov; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
415a2120f6bSDaniil Fukalov;
416a2120f6bSDaniil Fukalov  %A1 = fpext <4 x float> %c to <4 x double>
417a2120f6bSDaniil Fukalov  %A2 = fpext <8 x float> %a to <8 x double>
418a2120f6bSDaniil Fukalov  %A3 = fptrunc <4 x double> undef to <4 x float>
419a2120f6bSDaniil Fukalov  %A4 = fptrunc <8 x double> undef to <8 x float>
420a2120f6bSDaniil Fukalov  ret void
421a2120f6bSDaniil Fukalov}
422