3
3
; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -mattr=+vsx | FileCheck --check-prefix=CHECK-P8LE %s
4
4
; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr9 -mattr=+vsx | FileCheck --check-prefix=CHECK-P9BE %s
5
5
; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -mattr=+vsx | FileCheck --check-prefix=CHECK-P9LE %s
6
+ ; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr10 -mattr=+vsx | FileCheck --check-prefix=CHECK-P10 %s
6
7
7
8
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
8
9
target triple = "powerpc64-unknown-linux-gnu"
@@ -24,6 +25,10 @@ define i32 @insert(i32 %arg) {
24
25
; CHECK-P9LE-LABEL: 'insert'
25
26
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = insertelement <4 x i32> undef, i32 %arg, i32 0
26
27
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
28
+ ;
29
+ ; CHECK-P10-LABEL: 'insert'
30
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = insertelement <4 x i32> undef, i32 %arg, i32 0
31
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
27
32
;
28
33
%x = insertelement <4 x i32 > undef , i32 %arg , i32 0
29
34
ret i32 undef
@@ -46,6 +51,10 @@ define i32 @extract(<4 x i32> %arg) {
46
51
; CHECK-P9LE-LABEL: 'extract'
47
52
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <4 x i32> %arg, i32 0
48
53
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x
54
+ ;
55
+ ; CHECK-P10-LABEL: 'extract'
56
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = extractelement <4 x i32> %arg, i32 0
57
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x
49
58
;
50
59
%x = extractelement <4 x i32 > %arg , i32 0
51
60
ret i32 %x
@@ -71,6 +80,11 @@ define void @test2xdouble(<2 x double> %arg1) {
71
80
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = extractelement <2 x double> %arg1, i32 0
72
81
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement <2 x double> %arg1, i32 1
73
82
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
83
+ ;
84
+ ; CHECK-P10-LABEL: 'test2xdouble'
85
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = extractelement <2 x double> %arg1, i32 0
86
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement <2 x double> %arg1, i32 1
87
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
74
88
;
75
89
%v1 = extractelement <2 x double > %arg1 , i32 0
76
90
%v2 = extractelement <2 x double > %arg1 , i32 1
@@ -93,6 +107,10 @@ define void @test4xi32(<4 x i32> %v1, i32 %x1) {
93
107
; CHECK-P9LE-LABEL: 'test4xi32'
94
108
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 2
95
109
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
110
+ ;
111
+ ; CHECK-P10-LABEL: 'test4xi32'
112
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 2
113
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
96
114
;
97
115
%v2 = insertelement <4 x i32 > %v1 , i32 %x1 , i32 2
98
116
ret void
@@ -126,6 +144,13 @@ define void @vexti32(<4 x i32> %p1) {
126
144
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2
127
145
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3
128
146
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
147
+ ;
148
+ ; CHECK-P10-LABEL: 'vexti32'
149
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0
150
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1
151
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2
152
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3
153
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
129
154
;
130
155
%i1 = extractelement <4 x i32 > %p1 , i32 0
131
156
%i2 = extractelement <4 x i32 > %p1 , i32 1
@@ -154,6 +179,11 @@ define void @vexti64(<2 x i64> %p1) {
154
179
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0
155
180
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1
156
181
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
182
+ ;
183
+ ; CHECK-P10-LABEL: 'vexti64'
184
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0
185
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1
186
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
157
187
;
158
188
%i1 = extractelement <2 x i64 > %p1 , i32 0
159
189
%i2 = extractelement <2 x i64 > %p1 , i32 1
@@ -180,8 +210,213 @@ define void @vext(<8 x i16> %p1, <16 x i8> %p2) {
180
210
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0
181
211
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0
182
212
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
213
+ ;
214
+ ; CHECK-P10-LABEL: 'vext'
215
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0
216
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0
217
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
183
218
;
184
219
%i1 = extractelement <8 x i16 > %p1 , i32 0
185
220
%i2 = extractelement <16 x i8 > %p2 , i32 0
186
221
ret void
187
222
}
223
+
224
+ define <2 x i64 > @insert_i64_x (<2 x i64 > %dest , i64 %arg , i32 %idx ) {
225
+ ; CHECK-P7-LABEL: 'insert_i64_x'
226
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx
227
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x
228
+ ;
229
+ ; CHECK-P8LE-LABEL: 'insert_i64_x'
230
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx
231
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x
232
+ ;
233
+ ; CHECK-P9BE-LABEL: 'insert_i64_x'
234
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx
235
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x
236
+ ;
237
+ ; CHECK-P9LE-LABEL: 'insert_i64_x'
238
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx
239
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x
240
+ ;
241
+ ; CHECK-P10-LABEL: 'insert_i64_x'
242
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx
243
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x
244
+ ;
245
+ %x = insertelement <2 x i64 > %dest , i64 %arg , i32 %idx
246
+ ret <2 x i64 > %x
247
+ }
248
+
249
+ define <4 x i32 > @insert_i32_x (<4 x i32 > %dest , i32 %arg , i32 %idx ) {
250
+ ; CHECK-P7-LABEL: 'insert_i32_x'
251
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx
252
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x
253
+ ;
254
+ ; CHECK-P8LE-LABEL: 'insert_i32_x'
255
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx
256
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x
257
+ ;
258
+ ; CHECK-P9BE-LABEL: 'insert_i32_x'
259
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx
260
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x
261
+ ;
262
+ ; CHECK-P9LE-LABEL: 'insert_i32_x'
263
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx
264
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x
265
+ ;
266
+ ; CHECK-P10-LABEL: 'insert_i32_x'
267
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx
268
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x
269
+ ;
270
+ %x = insertelement <4 x i32 > %dest , i32 %arg , i32 %idx
271
+ ret <4 x i32 > %x
272
+ }
273
+
274
+ define <8 x i16 > @insert_i16_x (<8 x i16 > %dest , i16 %arg , i32 %idx ) {
275
+ ; CHECK-P7-LABEL: 'insert_i16_x'
276
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx
277
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x
278
+ ;
279
+ ; CHECK-P8LE-LABEL: 'insert_i16_x'
280
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx
281
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x
282
+ ;
283
+ ; CHECK-P9BE-LABEL: 'insert_i16_x'
284
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx
285
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x
286
+ ;
287
+ ; CHECK-P9LE-LABEL: 'insert_i16_x'
288
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx
289
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x
290
+ ;
291
+ ; CHECK-P10-LABEL: 'insert_i16_x'
292
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx
293
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x
294
+ ;
295
+ %x = insertelement <8 x i16 > %dest , i16 %arg , i32 %idx
296
+ ret <8 x i16 > %x
297
+ }
298
+
299
+ define <16 x i8 > @insert_i8_x (<16 x i8 > %dest , i8 %arg , i32 %idx ) {
300
+ ; CHECK-P7-LABEL: 'insert_i8_x'
301
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx
302
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x
303
+ ;
304
+ ; CHECK-P8LE-LABEL: 'insert_i8_x'
305
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx
306
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x
307
+ ;
308
+ ; CHECK-P9BE-LABEL: 'insert_i8_x'
309
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx
310
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x
311
+ ;
312
+ ; CHECK-P9LE-LABEL: 'insert_i8_x'
313
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx
314
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x
315
+ ;
316
+ ; CHECK-P10-LABEL: 'insert_i8_x'
317
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx
318
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x
319
+ ;
320
+ %x = insertelement <16 x i8 > %dest , i8 %arg , i32 %idx
321
+ ret <16 x i8 > %x
322
+ }
323
+
324
+ define i64 @extract_i64_x (<2 x i64 > %arg , i32 %idx ) {
325
+ ; CHECK-P7-LABEL: 'extract_i64_x'
326
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx
327
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x
328
+ ;
329
+ ; CHECK-P8LE-LABEL: 'extract_i64_x'
330
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx
331
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x
332
+ ;
333
+ ; CHECK-P9BE-LABEL: 'extract_i64_x'
334
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx
335
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x
336
+ ;
337
+ ; CHECK-P9LE-LABEL: 'extract_i64_x'
338
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx
339
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x
340
+ ;
341
+ ; CHECK-P10-LABEL: 'extract_i64_x'
342
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx
343
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x
344
+ ;
345
+ %x = extractelement <2 x i64 > %arg , i32 %idx
346
+ ret i64 %x
347
+ }
348
+
349
+ define i32 @extract_i32_x (<4 x i32 > %arg , i32 %idx ) {
350
+ ; CHECK-P7-LABEL: 'extract_i32_x'
351
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx
352
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x
353
+ ;
354
+ ; CHECK-P8LE-LABEL: 'extract_i32_x'
355
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx
356
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x
357
+ ;
358
+ ; CHECK-P9BE-LABEL: 'extract_i32_x'
359
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx
360
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x
361
+ ;
362
+ ; CHECK-P9LE-LABEL: 'extract_i32_x'
363
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx
364
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x
365
+ ;
366
+ ; CHECK-P10-LABEL: 'extract_i32_x'
367
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx
368
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x
369
+ ;
370
+ %x = extractelement <4 x i32 > %arg , i32 %idx
371
+ ret i32 %x
372
+ }
373
+
374
+ define i16 @extract_i16_x (<8 x i16 > %arg , i32 %idx ) {
375
+ ; CHECK-P7-LABEL: 'extract_i16_x'
376
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx
377
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x
378
+ ;
379
+ ; CHECK-P8LE-LABEL: 'extract_i16_x'
380
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx
381
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x
382
+ ;
383
+ ; CHECK-P9BE-LABEL: 'extract_i16_x'
384
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx
385
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x
386
+ ;
387
+ ; CHECK-P9LE-LABEL: 'extract_i16_x'
388
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx
389
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x
390
+ ;
391
+ ; CHECK-P10-LABEL: 'extract_i16_x'
392
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx
393
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x
394
+ ;
395
+ %x = extractelement <8 x i16 > %arg , i32 %idx
396
+ ret i16 %x
397
+ }
398
+
399
+ define i8 @extract_i8_x (<16 x i8 > %arg , i32 %idx ) {
400
+ ; CHECK-P7-LABEL: 'extract_i8_x'
401
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx
402
+ ; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x
403
+ ;
404
+ ; CHECK-P8LE-LABEL: 'extract_i8_x'
405
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx
406
+ ; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x
407
+ ;
408
+ ; CHECK-P9BE-LABEL: 'extract_i8_x'
409
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx
410
+ ; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x
411
+ ;
412
+ ; CHECK-P9LE-LABEL: 'extract_i8_x'
413
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx
414
+ ; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x
415
+ ;
416
+ ; CHECK-P10-LABEL: 'extract_i8_x'
417
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx
418
+ ; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x
419
+ ;
420
+ %x = extractelement <16 x i8 > %arg , i32 %idx
421
+ ret i8 %x
422
+ }
0 commit comments