1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2; RUN: opt < %s -mtriple=riscv32 -mattr=+v,+zfh,+experimental-zvfh -riscv-v-vector-bits-min=256 -passes='print<cost-model>' -cost-kind=throughput 2>&1 -disable-output | FileCheck %s --check-prefix=RISCV32
3; RUN: opt < %s -mtriple=riscv64 -mattr=+v,+zfh,+experimental-zvfh -riscv-v-vector-bits-min=256 -passes='print<cost-model>' -cost-kind=throughput 2>&1 -disable-output | FileCheck %s --check-prefix=RISCV64
4
5define void @ext() {
6; RISCV32-LABEL: 'ext'
7; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i8i16 = sext <4 x i8> undef to <4 x i16>
8; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i8i16 = zext <4 x i8> undef to <4 x i16>
9; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i8i32 = sext <4 x i8> undef to <4 x i32>
10; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i8i32 = zext <4 x i8> undef to <4 x i32>
11; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i8i64 = sext <4 x i8> undef to <4 x i64>
12; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i8i64 = zext <4 x i8> undef to <4 x i64>
13; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i16i32 = sext <4 x i16> undef to <4 x i32>
14; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i16i32 = zext <4 x i16> undef to <4 x i32>
15; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i16i64 = sext <4 x i16> undef to <4 x i64>
16; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i16i64 = zext <4 x i16> undef to <4 x i64>
17; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i32i64 = sext <4 x i32> undef to <4 x i64>
18; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i32i64 = zext <4 x i32> undef to <4 x i64>
19; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i8i16 = sext <8 x i8> undef to <8 x i16>
20; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i8i16 = zext <8 x i8> undef to <8 x i16>
21; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i8i32 = sext <8 x i8> undef to <8 x i32>
22; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i8i32 = zext <8 x i8> undef to <8 x i32>
23; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i8i64 = sext <8 x i8> undef to <8 x i64>
24; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i8i64 = zext <8 x i8> undef to <8 x i64>
25; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i16i32 = sext <8 x i16> undef to <8 x i32>
26; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i16i32 = zext <8 x i16> undef to <8 x i32>
27; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i16i64 = sext <8 x i16> undef to <8 x i64>
28; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i16i64 = zext <8 x i16> undef to <8 x i64>
29; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
30;
31; RISCV64-LABEL: 'ext'
32; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i8i16 = sext <4 x i8> undef to <4 x i16>
33; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i8i16 = zext <4 x i8> undef to <4 x i16>
34; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i8i32 = sext <4 x i8> undef to <4 x i32>
35; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i8i32 = zext <4 x i8> undef to <4 x i32>
36; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i8i64 = sext <4 x i8> undef to <4 x i64>
37; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i8i64 = zext <4 x i8> undef to <4 x i64>
38; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i16i32 = sext <4 x i16> undef to <4 x i32>
39; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i16i32 = zext <4 x i16> undef to <4 x i32>
40; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i16i64 = sext <4 x i16> undef to <4 x i64>
41; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i16i64 = zext <4 x i16> undef to <4 x i64>
42; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i32i64 = sext <4 x i32> undef to <4 x i64>
43; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z4i32i64 = zext <4 x i32> undef to <4 x i64>
44; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i8i16 = sext <8 x i8> undef to <8 x i16>
45; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i8i16 = zext <8 x i8> undef to <8 x i16>
46; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i8i32 = sext <8 x i8> undef to <8 x i32>
47; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i8i32 = zext <8 x i8> undef to <8 x i32>
48; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i8i64 = sext <8 x i8> undef to <8 x i64>
49; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i8i64 = zext <8 x i8> undef to <8 x i64>
50; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i16i32 = sext <8 x i16> undef to <8 x i32>
51; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i16i32 = zext <8 x i16> undef to <8 x i32>
52; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8i16i64 = sext <8 x i16> undef to <8 x i64>
53; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %z8i16i64 = zext <8 x i16> undef to <8 x i64>
54; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
55  %s4i8i16 = sext <4 x i8>  undef to <4 x i16>
56  %z4i8i16 = zext <4 x i8>  undef to <4 x i16>
57  %s4i8i32 = sext <4 x i8>  undef to <4 x i32>
58  %z4i8i32 = zext <4 x i8>  undef to <4 x i32>
59  %s4i8i64 = sext <4 x i8>  undef to <4 x i64>
60  %z4i8i64 = zext <4 x i8>  undef to <4 x i64>
61  %s4i16i32 = sext <4 x i16> undef to <4 x i32>
62  %z4i16i32 = zext <4 x i16> undef to <4 x i32>
63  %s4i16i64 = sext <4 x i16> undef to <4 x i64>
64  %z4i16i64 = zext <4 x i16> undef to <4 x i64>
65  %s4i32i64 = sext <4 x i32> undef to <4 x i64>
66  %z4i32i64 = zext <4 x i32> undef to <4 x i64>
67
68  %s8i8i16 = sext <8 x i8>  undef to <8 x i16>
69  %z8i8i16 = zext <8 x i8>  undef to <8 x i16>
70  %s8i8i32 = sext <8 x i8>  undef to <8 x i32>
71  %z8i8i32 = zext <8 x i8>  undef to <8 x i32>
72  %s8i8i64 = sext <8 x i8>  undef to <8 x i64>
73  %z8i8i64 = zext <8 x i8>  undef to <8 x i64>
74  %s8i16i32 = sext <8 x i16> undef to <8 x i32>
75  %z8i16i32 = zext <8 x i16> undef to <8 x i32>
76  %s8i16i64 = sext <8 x i16> undef to <8 x i64>
77  %z8i16i64 = zext <8 x i16> undef to <8 x i64>
78  ret void
79}
80
81define void @trunc() {
82; RISCV32-LABEL: 'trunc'
83; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i8i16 = trunc <4 x i16> undef to <4 x i8>
84; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s4i8i32 = trunc <4 x i32> undef to <4 x i8>
85; RISCV32-NEXT:  Cost Model: Found an estimated cost of 3 for instruction:   %s4i8i64 = trunc <4 x i64> undef to <4 x i8>
86; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i16i32 = trunc <4 x i32> undef to <4 x i16>
87; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s4i16i64 = trunc <4 x i64> undef to <4 x i16>
88; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i32i64 = trunc <4 x i64> undef to <4 x i32>
89; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
90;
91; RISCV64-LABEL: 'trunc'
92; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i8i16 = trunc <4 x i16> undef to <4 x i8>
93; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s4i8i32 = trunc <4 x i32> undef to <4 x i8>
94; RISCV64-NEXT:  Cost Model: Found an estimated cost of 3 for instruction:   %s4i8i64 = trunc <4 x i64> undef to <4 x i8>
95; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i16i32 = trunc <4 x i32> undef to <4 x i16>
96; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s4i16i64 = trunc <4 x i64> undef to <4 x i16>
97; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4i32i64 = trunc <4 x i64> undef to <4 x i32>
98; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
99  %s4i8i16 = trunc <4 x i16> undef to <4 x i8>
100  %s4i8i32 = trunc <4 x i32> undef to <4 x i8>
101  %s4i8i64 = trunc <4 x i64> undef to <4 x i8>
102  %s4i16i32 = trunc <4 x i32> undef to <4 x i16>
103  %s4i16i64 = trunc <4 x i64> undef to <4 x i16>
104  %s4i32i64 = trunc <4 x i64> undef to <4 x i32>
105  ret void
106}
107
108define void @fpext() {
109; RISCV32-LABEL: 'fpext'
110; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %v0 = fpext <8 x half> undef to <8 x float>
111; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %v1 = fpext <8 x half> undef to <8 x double>
112; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %v2 = fpext <8 x float> undef to <8 x double>
113; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
114;
115; RISCV64-LABEL: 'fpext'
116; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %v0 = fpext <8 x half> undef to <8 x float>
117; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %v1 = fpext <8 x half> undef to <8 x double>
118; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %v2 = fpext <8 x float> undef to <8 x double>
119; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
120  %v0 = fpext <8 x half>  undef to <8 x float>
121  %v1 = fpext <8 x half>  undef to <8 x double>
122  %v2 = fpext <8 x float> undef to <8 x double>
123  ret void
124}
125
126define void @ftrunc() {
127; RISCV32-LABEL: 'ftrunc'
128; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %v0 = fptrunc <8 x float> undef to <8 x half>
129; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %v1 = fptrunc <8 x double> undef to <8 x half>
130; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %v2 = fptrunc <8 x double> undef to <8 x float>
131; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
132;
133; RISCV64-LABEL: 'ftrunc'
134; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %v0 = fptrunc <8 x float> undef to <8 x half>
135; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %v1 = fptrunc <8 x double> undef to <8 x half>
136; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %v2 = fptrunc <8 x double> undef to <8 x float>
137; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
138  %v0 = fptrunc <8 x float> undef to <8 x half>
139  %v1 = fptrunc <8 x double> undef to <8 x half>
140  %v2 = fptrunc <8 x double> undef to <8 x float>
141  ret void
142}
143
144define void @fp_to_int() {
145; RISCV32-LABEL: 'fp_to_int'
146; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s0 = fptosi <4 x half> undef to <4 x i8>
147; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s1 = fptosi <4 x float> undef to <4 x i8>
148; RISCV32-NEXT:  Cost Model: Found an estimated cost of 3 for instruction:   %s2 = fptosi <4 x double> undef to <4 x i8>
149; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s3 = fptosi <4 x half> undef to <4 x i16>
150; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4 = fptosi <4 x float> undef to <4 x i16>
151; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s5 = fptosi <4 x double> undef to <4 x i16>
152; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s6 = fptosi <4 x half> undef to <4 x i32>
153; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s7 = fptosi <4 x float> undef to <4 x i32>
154; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8 = fptosi <4 x double> undef to <4 x i32>
155; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s9 = fptosi <4 x half> undef to <4 x i64>
156; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s10 = fptosi <4 x float> undef to <4 x i64>
157; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s11 = fptosi <4 x double> undef to <4 x i16>
158; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u0 = fptoui <4 x half> undef to <4 x i8>
159; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u1 = fptoui <4 x float> undef to <4 x i8>
160; RISCV32-NEXT:  Cost Model: Found an estimated cost of 3 for instruction:   %u2 = fptoui <4 x double> undef to <4 x i8>
161; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u3 = fptoui <4 x half> undef to <4 x i16>
162; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u4 = fptoui <4 x float> undef to <4 x i16>
163; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u5 = fptoui <4 x double> undef to <4 x i16>
164; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u6 = fptoui <4 x half> undef to <4 x i32>
165; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u7 = fptoui <4 x float> undef to <4 x i32>
166; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u8 = fptoui <4 x double> undef to <4 x i32>
167; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u9 = fptoui <4 x half> undef to <4 x i64>
168; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u10 = fptoui <4 x float> undef to <4 x i64>
169; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u11 = fptoui <4 x double> undef to <4 x i16>
170; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
171;
172; RISCV64-LABEL: 'fp_to_int'
173; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s0 = fptosi <4 x half> undef to <4 x i8>
174; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s1 = fptosi <4 x float> undef to <4 x i8>
175; RISCV64-NEXT:  Cost Model: Found an estimated cost of 3 for instruction:   %s2 = fptosi <4 x double> undef to <4 x i8>
176; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s3 = fptosi <4 x half> undef to <4 x i16>
177; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4 = fptosi <4 x float> undef to <4 x i16>
178; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s5 = fptosi <4 x double> undef to <4 x i16>
179; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s6 = fptosi <4 x half> undef to <4 x i32>
180; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s7 = fptosi <4 x float> undef to <4 x i32>
181; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8 = fptosi <4 x double> undef to <4 x i32>
182; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s9 = fptosi <4 x half> undef to <4 x i64>
183; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s10 = fptosi <4 x float> undef to <4 x i64>
184; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s11 = fptosi <4 x double> undef to <4 x i16>
185; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u0 = fptoui <4 x half> undef to <4 x i8>
186; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u1 = fptoui <4 x float> undef to <4 x i8>
187; RISCV64-NEXT:  Cost Model: Found an estimated cost of 3 for instruction:   %u2 = fptoui <4 x double> undef to <4 x i8>
188; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u3 = fptoui <4 x half> undef to <4 x i16>
189; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u4 = fptoui <4 x float> undef to <4 x i16>
190; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u5 = fptoui <4 x double> undef to <4 x i16>
191; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u6 = fptoui <4 x half> undef to <4 x i32>
192; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u7 = fptoui <4 x float> undef to <4 x i32>
193; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u8 = fptoui <4 x double> undef to <4 x i32>
194; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u9 = fptoui <4 x half> undef to <4 x i64>
195; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u10 = fptoui <4 x float> undef to <4 x i64>
196; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u11 = fptoui <4 x double> undef to <4 x i16>
197; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
198  %s0 = fptosi <4 x half> undef to <4 x i8>
199  %s1 = fptosi <4 x float> undef to <4 x i8>
200  %s2 = fptosi <4 x double> undef to <4 x i8>
201  %s3 = fptosi <4 x half> undef to <4 x i16>
202  %s4 = fptosi <4 x float> undef to <4 x i16>
203  %s5 = fptosi <4 x double> undef to <4 x i16>
204  %s6 = fptosi <4 x half> undef to <4 x i32>
205  %s7 = fptosi <4 x float> undef to <4 x i32>
206  %s8 = fptosi <4 x double> undef to <4 x i32>
207  %s9 = fptosi <4 x half> undef to <4 x i64>
208  %s10 = fptosi <4 x float> undef to <4 x i64>
209  %s11 = fptosi <4 x double> undef to <4 x i16>
210
211  %u0 = fptoui <4 x half> undef to <4 x i8>
212  %u1 = fptoui <4 x float> undef to <4 x i8>
213  %u2 = fptoui <4 x double> undef to <4 x i8>
214  %u3 = fptoui <4 x half> undef to <4 x i16>
215  %u4 = fptoui <4 x float> undef to <4 x i16>
216  %u5 = fptoui <4 x double> undef to <4 x i16>
217  %u6 = fptoui <4 x half> undef to <4 x i32>
218  %u7 = fptoui <4 x float> undef to <4 x i32>
219  %u8 = fptoui <4 x double> undef to <4 x i32>
220  %u9 = fptoui <4 x half> undef to <4 x i64>
221  %u10 = fptoui <4 x float> undef to <4 x i64>
222  %u11 = fptoui <4 x double> undef to <4 x i16>
223  ret void
224}
225
226define void @int_to_fp() {
227; RISCV32-LABEL: 'int_to_fp'
228; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s0 = sitofp <4 x i8> undef to <4 x half>
229; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s1 = sitofp <4 x i8> undef to <4 x float>
230; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s2 = sitofp <4 x i8> undef to <4 x double>
231; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s3 = sitofp <4 x i16> undef to <4 x half>
232; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4 = sitofp <4 x i16> undef to <4 x float>
233; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s5 = sitofp <4 x i16> undef to <4 x double>
234; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s6 = sitofp <4 x i32> undef to <4 x half>
235; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s7 = sitofp <4 x i32> undef to <4 x float>
236; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8 = sitofp <4 x i32> undef to <4 x double>
237; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s9 = sitofp <4 x i64> undef to <4 x half>
238; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s10 = sitofp <4 x i64> undef to <4 x float>
239; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s11 = sitofp <4 x i16> undef to <4 x double>
240; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u0 = uitofp <4 x i8> undef to <4 x half>
241; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u1 = uitofp <4 x i8> undef to <4 x float>
242; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u2 = uitofp <4 x i8> undef to <4 x double>
243; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u3 = uitofp <4 x i16> undef to <4 x half>
244; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u4 = uitofp <4 x i16> undef to <4 x float>
245; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u5 = uitofp <4 x i16> undef to <4 x double>
246; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u6 = uitofp <4 x i32> undef to <4 x half>
247; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u7 = uitofp <4 x i32> undef to <4 x float>
248; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u8 = uitofp <4 x i32> undef to <4 x double>
249; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u9 = uitofp <4 x i64> undef to <4 x half>
250; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u10 = uitofp <4 x i64> undef to <4 x float>
251; RISCV32-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u11 = uitofp <4 x i16> undef to <4 x double>
252; RISCV32-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
253;
254; RISCV64-LABEL: 'int_to_fp'
255; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s0 = sitofp <4 x i8> undef to <4 x half>
256; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s1 = sitofp <4 x i8> undef to <4 x float>
257; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s2 = sitofp <4 x i8> undef to <4 x double>
258; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s3 = sitofp <4 x i16> undef to <4 x half>
259; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s4 = sitofp <4 x i16> undef to <4 x float>
260; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s5 = sitofp <4 x i16> undef to <4 x double>
261; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s6 = sitofp <4 x i32> undef to <4 x half>
262; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s7 = sitofp <4 x i32> undef to <4 x float>
263; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s8 = sitofp <4 x i32> undef to <4 x double>
264; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s9 = sitofp <4 x i64> undef to <4 x half>
265; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %s10 = sitofp <4 x i64> undef to <4 x float>
266; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %s11 = sitofp <4 x i16> undef to <4 x double>
267; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u0 = uitofp <4 x i8> undef to <4 x half>
268; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u1 = uitofp <4 x i8> undef to <4 x float>
269; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u2 = uitofp <4 x i8> undef to <4 x double>
270; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u3 = uitofp <4 x i16> undef to <4 x half>
271; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u4 = uitofp <4 x i16> undef to <4 x float>
272; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u5 = uitofp <4 x i16> undef to <4 x double>
273; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u6 = uitofp <4 x i32> undef to <4 x half>
274; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u7 = uitofp <4 x i32> undef to <4 x float>
275; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u8 = uitofp <4 x i32> undef to <4 x double>
276; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u9 = uitofp <4 x i64> undef to <4 x half>
277; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   %u10 = uitofp <4 x i64> undef to <4 x float>
278; RISCV64-NEXT:  Cost Model: Found an estimated cost of 2 for instruction:   %u11 = uitofp <4 x i16> undef to <4 x double>
279; RISCV64-NEXT:  Cost Model: Found an estimated cost of 1 for instruction:   ret void
280  %s0 = sitofp <4 x i8> undef to <4 x half>
281  %s1 = sitofp <4 x i8> undef to <4 x float>
282  %s2 = sitofp <4 x i8> undef to <4 x double>
283  %s3 = sitofp <4 x i16> undef to <4 x half>
284  %s4 = sitofp <4 x i16> undef to <4 x float>
285  %s5 = sitofp <4 x i16> undef to <4 x double>
286  %s6 = sitofp <4 x i32> undef to <4 x half>
287  %s7 = sitofp <4 x i32> undef to <4 x float>
288  %s8 = sitofp <4 x i32> undef to <4 x double>
289  %s9 = sitofp <4 x i64> undef to <4 x half>
290  %s10 = sitofp <4 x i64> undef to <4 x float>
291  %s11 = sitofp <4 x i16> undef to <4 x double>
292
293  %u0 = uitofp <4 x i8> undef to <4 x half>
294  %u1 = uitofp <4 x i8> undef to <4 x float>
295  %u2 = uitofp <4 x i8> undef to <4 x double>
296  %u3 = uitofp <4 x i16> undef to <4 x half>
297  %u4 = uitofp <4 x i16> undef to <4 x float>
298  %u5 = uitofp <4 x i16> undef to <4 x double>
299  %u6 = uitofp <4 x i32> undef to <4 x half>
300  %u7 = uitofp <4 x i32> undef to <4 x float>
301  %u8 = uitofp <4 x i32> undef to <4 x double>
302  %u9 = uitofp <4 x i64> undef to <4 x half>
303  %u10 = uitofp <4 x i64> undef to <4 x float>
304  %u11 = uitofp <4 x i16> undef to <4 x double>
305  ret void
306}
307