1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+experimental-zvfh -riscv-v-vector-bits-min=128 -riscv-v-fixed-length-vector-lmul-max=1 < %s | FileCheck %s
3 ; Check that we don't crash querying costs when vectors are not enabled.
4 ; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv64
6 define void @load(ptr %p) {
8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, ptr %p, align 1
9 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <1 x i8>, ptr %p, align 1
10 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <2 x i8>, ptr %p, align 2
11 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i8>, ptr %p, align 4
12 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <8 x i8>, ptr %p, align 8
13 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <16 x i8>, ptr %p, align 16
14 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load <32 x i8>, ptr %p, align 32
15 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <vscale x 1 x i8>, ptr %p, align 1
16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <vscale x 2 x i8>, ptr %p, align 2
17 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <vscale x 4 x i8>, ptr %p, align 4
18 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <vscale x 8 x i8>, ptr %p, align 8
19 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <vscale x 16 x i8>, ptr %p, align 16
20 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load <vscale x 32 x i8>, ptr %p, align 32
21 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load i16, ptr %p, align 2
22 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <1 x i16>, ptr %p, align 2
23 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <2 x i16>, ptr %p, align 4
24 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load <4 x i16>, ptr %p, align 8
25 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = load <8 x i16>, ptr %p, align 16
26 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = load <16 x i16>, ptr %p, align 32
27 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %20 = load <32 x i16>, ptr %p, align 64
28 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = load <vscale x 1 x i16>, ptr %p, align 2
29 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = load <vscale x 2 x i16>, ptr %p, align 4
30 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = load <vscale x 4 x i16>, ptr %p, align 8
31 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = load <vscale x 8 x i16>, ptr %p, align 16
32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %25 = load <vscale x 16 x i16>, ptr %p, align 32
33 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %26 = load <vscale x 32 x i16>, ptr %p, align 64
34 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = load i32, ptr %p, align 4
35 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = load <1 x i32>, ptr %p, align 4
36 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %29 = load <2 x i32>, ptr %p, align 8
37 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %30 = load <4 x i32>, ptr %p, align 16
38 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = load <8 x i32>, ptr %p, align 32
39 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %32 = load <16 x i32>, ptr %p, align 64
40 ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %33 = load <32 x i32>, ptr %p, align 128
41 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = load <vscale x 1 x i32>, ptr %p, align 4
42 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = load <vscale x 2 x i32>, ptr %p, align 8
43 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %36 = load <vscale x 4 x i32>, ptr %p, align 16
44 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = load <vscale x 8 x i32>, ptr %p, align 32
45 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = load <vscale x 16 x i32>, ptr %p, align 64
46 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %39 = load <vscale x 32 x i32>, ptr %p, align 128
47 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %40 = load i64, ptr %p, align 4
48 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %41 = load <1 x i64>, ptr %p, align 8
49 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %42 = load <2 x i64>, ptr %p, align 16
50 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %43 = load <4 x i64>, ptr %p, align 32
51 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %44 = load <8 x i64>, ptr %p, align 64
52 ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %45 = load <16 x i64>, ptr %p, align 128
53 ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %46 = load <32 x i64>, ptr %p, align 256
54 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %47 = load <vscale x 1 x i64>, ptr %p, align 8
55 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %48 = load <vscale x 2 x i64>, ptr %p, align 16
56 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %49 = load <vscale x 4 x i64>, ptr %p, align 32
57 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %50 = load <vscale x 8 x i64>, ptr %p, align 64
58 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %51 = load <vscale x 16 x i64>, ptr %p, align 128
59 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %52 = load <vscale x 32 x i64>, ptr %p, align 256
60 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %53 = load ptr, ptr %p, align 8
61 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %54 = load <1 x ptr>, ptr %p, align 8
62 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %55 = load <2 x ptr>, ptr %p, align 16
63 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %56 = load <4 x ptr>, ptr %p, align 32
64 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %57 = load <8 x ptr>, ptr %p, align 64
65 ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %58 = load <16 x ptr>, ptr %p, align 128
66 ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %59 = load <32 x ptr>, ptr %p, align 256
67 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %60 = load <vscale x 1 x ptr>, ptr %p, align 8
68 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %61 = load <vscale x 2 x ptr>, ptr %p, align 16
69 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %62 = load <vscale x 4 x ptr>, ptr %p, align 32
70 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %63 = load <vscale x 8 x ptr>, ptr %p, align 64
71 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %64 = load <vscale x 16 x ptr>, ptr %p, align 128
72 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %65 = load <vscale x 32 x ptr>, ptr %p, align 256
73 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
80 load <16 x i8>, ptr %p
81 load <32 x i8>, ptr %p
82 load <vscale x 1 x i8>, ptr %p
83 load <vscale x 2 x i8>, ptr %p
84 load <vscale x 4 x i8>, ptr %p
85 load <vscale x 8 x i8>, ptr %p
86 load <vscale x 16 x i8>, ptr %p
87 load <vscale x 32 x i8>, ptr %p
90 load <1 x i16>, ptr %p
91 load <2 x i16>, ptr %p
92 load <4 x i16>, ptr %p
93 load <8 x i16>, ptr %p
94 load <16 x i16>, ptr %p
95 load <32 x i16>, ptr %p
96 load <vscale x 1 x i16>, ptr %p
97 load <vscale x 2 x i16>, ptr %p
98 load <vscale x 4 x i16>, ptr %p
99 load <vscale x 8 x i16>, ptr %p
100 load <vscale x 16 x i16>, ptr %p
101 load <vscale x 32 x i16>, ptr %p
105 load <1 x i32>, ptr %p
106 load <2 x i32>, ptr %p
107 load <4 x i32>, ptr %p
108 load <8 x i32>, ptr %p
109 load <16 x i32>, ptr %p
110 load <32 x i32>, ptr %p
111 load <vscale x 1 x i32>, ptr %p
112 load <vscale x 2 x i32>, ptr %p
113 load <vscale x 4 x i32>, ptr %p
114 load <vscale x 8 x i32>, ptr %p
115 load <vscale x 16 x i32>, ptr %p
116 load <vscale x 32 x i32>, ptr %p
119 load <1 x i64>, ptr %p
120 load <2 x i64>, ptr %p
121 load <4 x i64>, ptr %p
122 load <8 x i64>, ptr %p
123 load <16 x i64>, ptr %p
124 load <32 x i64>, ptr %p
125 load <vscale x 1 x i64>, ptr %p
126 load <vscale x 2 x i64>, ptr %p
127 load <vscale x 4 x i64>, ptr %p
128 load <vscale x 8 x i64>, ptr %p
129 load <vscale x 16 x i64>, ptr %p
130 load <vscale x 32 x i64>, ptr %p
133 load <1 x ptr>, ptr %p
134 load <2 x ptr>, ptr %p
135 load <4 x ptr>, ptr %p
136 load <8 x ptr>, ptr %p
137 load <16 x ptr>, ptr %p
138 load <32 x ptr>, ptr %p
139 load <vscale x 1 x ptr>, ptr %p
140 load <vscale x 2 x ptr>, ptr %p
141 load <vscale x 4 x ptr>, ptr %p
142 load <vscale x 8 x ptr>, ptr %p
143 load <vscale x 16 x ptr>, ptr %p
144 load <vscale x 32 x ptr>, ptr %p
149 define void @store(ptr %p) {
150 ; CHECK-LABEL: 'store'
151 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, ptr %p, align 1
152 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i8> undef, ptr %p, align 1
153 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> undef, ptr %p, align 2
154 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> undef, ptr %p, align 4
155 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> undef, ptr %p, align 8
156 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> undef, ptr %p, align 16
157 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <32 x i8> undef, ptr %p, align 32
158 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 1 x i8> undef, ptr %p, align 1
159 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 2 x i8> undef, ptr %p, align 2
160 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 4 x i8> undef, ptr %p, align 4
161 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 8 x i8> undef, ptr %p, align 8
162 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 16 x i8> undef, ptr %p, align 16
163 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 32 x i8> undef, ptr %p, align 32
164 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, ptr %p, align 2
165 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i16> undef, ptr %p, align 2
166 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> undef, ptr %p, align 4
167 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> undef, ptr %p, align 8
168 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, ptr %p, align 16
169 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> undef, ptr %p, align 32
170 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <32 x i16> undef, ptr %p, align 64
171 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 1 x i16> undef, ptr %p, align 2
172 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 2 x i16> undef, ptr %p, align 4
173 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 4 x i16> undef, ptr %p, align 8
174 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 8 x i16> undef, ptr %p, align 16
175 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 16 x i16> undef, ptr %p, align 32
176 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 32 x i16> undef, ptr %p, align 64
177 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, ptr %p, align 4
178 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i32> undef, ptr %p, align 4
179 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> undef, ptr %p, align 8
180 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, ptr %p, align 16
181 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> undef, ptr %p, align 32
182 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> undef, ptr %p, align 64
183 ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <32 x i32> undef, ptr %p, align 128
184 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 1 x i32> undef, ptr %p, align 4
185 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 2 x i32> undef, ptr %p, align 8
186 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 4 x i32> undef, ptr %p, align 16
187 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 8 x i32> undef, ptr %p, align 32
188 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 16 x i32> undef, ptr %p, align 64
189 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <vscale x 32 x i32> undef, ptr %p, align 128
190 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 undef, ptr %p, align 4
191 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i64> undef, ptr %p, align 8
192 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, ptr %p, align 16
193 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> undef, ptr %p, align 32
194 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <8 x i64> undef, ptr %p, align 64
195 ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <16 x i64> undef, ptr %p, align 128
196 ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <32 x i64> undef, ptr %p, align 256
197 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 1 x i64> undef, ptr %p, align 8
198 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 2 x i64> undef, ptr %p, align 16
199 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 4 x i64> undef, ptr %p, align 32
200 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 8 x i64> undef, ptr %p, align 64
201 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <vscale x 16 x i64> undef, ptr %p, align 128
202 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <vscale x 32 x i64> undef, ptr %p, align 256
203 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store ptr undef, ptr %p, align 8
204 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x ptr> undef, ptr %p, align 8
205 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x ptr> undef, ptr %p, align 16
206 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x ptr> undef, ptr %p, align 32
207 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <8 x ptr> undef, ptr %p, align 64
208 ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <16 x ptr> undef, ptr %p, align 128
209 ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <32 x ptr> undef, ptr %p, align 256
210 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 1 x ptr> undef, ptr %p, align 8
211 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 2 x ptr> undef, ptr %p, align 16
212 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 4 x ptr> undef, ptr %p, align 32
213 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <vscale x 8 x ptr> undef, ptr %p, align 64
214 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <vscale x 16 x ptr> undef, ptr %p, align 128
215 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <vscale x 32 x ptr> undef, ptr %p, align 256
216 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
218 store i8 undef, ptr %p
219 store <1 x i8> undef, ptr %p
220 store <2 x i8> undef, ptr %p
221 store <4 x i8> undef, ptr %p
222 store <8 x i8> undef, ptr %p
223 store <16 x i8> undef, ptr %p
224 store <32 x i8> undef, ptr %p
225 store <vscale x 1 x i8> undef, ptr %p
226 store <vscale x 2 x i8> undef, ptr %p
227 store <vscale x 4 x i8> undef, ptr %p
228 store <vscale x 8 x i8> undef, ptr %p
229 store <vscale x 16 x i8> undef, ptr %p
230 store <vscale x 32 x i8> undef, ptr %p
232 store i16 undef, ptr %p
233 store <1 x i16> undef, ptr %p
234 store <2 x i16> undef, ptr %p
235 store <4 x i16> undef, ptr %p
236 store <8 x i16> undef, ptr %p
237 store <16 x i16> undef, ptr %p
238 store <32 x i16> undef, ptr %p
239 store <vscale x 1 x i16> undef, ptr %p
240 store <vscale x 2 x i16> undef, ptr %p
241 store <vscale x 4 x i16> undef, ptr %p
242 store <vscale x 8 x i16> undef, ptr %p
243 store <vscale x 16 x i16> undef, ptr %p
244 store <vscale x 32 x i16> undef, ptr %p
247 store i32 undef, ptr %p
248 store <1 x i32> undef, ptr %p
249 store <2 x i32> undef, ptr %p
250 store <4 x i32> undef, ptr %p
251 store <8 x i32> undef, ptr %p
252 store <16 x i32> undef, ptr %p
253 store <32 x i32> undef, ptr %p
254 store <vscale x 1 x i32> undef, ptr %p
255 store <vscale x 2 x i32> undef, ptr %p
256 store <vscale x 4 x i32> undef, ptr %p
257 store <vscale x 8 x i32> undef, ptr %p
258 store <vscale x 16 x i32> undef, ptr %p
259 store <vscale x 32 x i32> undef, ptr %p
261 store i64 undef, ptr %p
262 store <1 x i64> undef, ptr %p
263 store <2 x i64> undef, ptr %p
264 store <4 x i64> undef, ptr %p
265 store <8 x i64> undef, ptr %p
266 store <16 x i64> undef, ptr %p
267 store <32 x i64> undef, ptr %p
268 store <vscale x 1 x i64> undef, ptr %p
269 store <vscale x 2 x i64> undef, ptr %p
270 store <vscale x 4 x i64> undef, ptr %p
271 store <vscale x 8 x i64> undef, ptr %p
272 store <vscale x 16 x i64> undef, ptr %p
273 store <vscale x 32 x i64> undef, ptr %p
275 store ptr undef, ptr %p
276 store <1 x ptr> undef, ptr %p
277 store <2 x ptr> undef, ptr %p
278 store <4 x ptr> undef, ptr %p
279 store <8 x ptr> undef, ptr %p
280 store <16 x ptr> undef, ptr %p
281 store <32 x ptr> undef, ptr %p
282 store <vscale x 1 x ptr> undef, ptr %p
283 store <vscale x 2 x ptr> undef, ptr %p
284 store <vscale x 4 x ptr> undef, ptr %p
285 store <vscale x 8 x ptr> undef, ptr %p
286 store <vscale x 16 x ptr> undef, ptr %p
287 store <vscale x 32 x ptr> undef, ptr %p
292 ; For constants, have to account for cost of materializing the constant itself
293 ; This test exercises a few interesting constant patterns at VLEN=128
294 define void @store_of_constant(ptr %p) {
295 ; CHECK-LABEL: 'store_of_constant'
296 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr %p, align 16
297 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, ptr %p, align 16
298 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> zeroinitializer, ptr %p, align 16
299 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> zeroinitializer, ptr %p, align 32
300 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %p, align 16
301 ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: store <4 x i64> <i64 1, i64 1, i64 1, i64 1>, ptr %p, align 32
302 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 4096, i32 4096, i32 4096, i32 4096>, ptr %p, align 16
303 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 1, i32 1, i32 2, i32 1>, ptr %p, align 16
304 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 2, i32 1, i32 1, i32 1>, ptr %p, align 16
305 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, ptr %p, align 16
306 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, ptr %p, align 16
307 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 -1, i32 -2, i32 -3, i32 -4>, ptr %p, align 16
308 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 2, i32 4, i32 6, i32 8>, ptr %p, align 16
309 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 -1, i32 0, i32 2, i32 1>, ptr %p, align 16
310 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i32> <i32 256, i32 4096, i32 57, i32 1>, ptr %p, align 16
311 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
315 store <4 x i32> poison, ptr %p
316 store <4 x i32> undef, ptr %p
319 store <4 x i32> zeroinitializer, ptr %p
320 store <4 x i64> zeroinitializer, ptr %p
321 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %p
322 store <4 x i64> <i64 1, i64 1, i64 1, i64 1>, ptr %p
323 store <4 x i32> <i32 4096, i32 4096, i32 4096, i32 4096>, ptr %p
326 store <4 x i32> <i32 1, i32 1, i32 2, i32 1>, ptr %p
327 store <4 x i32> <i32 2, i32 1, i32 1, i32 1>, ptr %p
329 ; Step vector functions
330 store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, ptr %p
331 store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, ptr %p
332 store <4 x i32> <i32 -1, i32 -2, i32 -3, i32 -4>, ptr %p
333 store <4 x i32> <i32 2, i32 4, i32 6, i32 8>, ptr %p
335 ; General case 128 bit constants
336 store <4 x i32> <i32 -1, i32 0, i32 2, i32 1>, ptr %p
337 store <4 x i32> <i32 256, i32 4096, i32 57, i32 1>, ptr %p