Skip to content

Commit 097a40a

Browse files
author
Chen Zheng
committed
nfc add test cases for PowerPC vector instructions cost analysis
1 parent 4ef646e commit 097a40a

File tree

1 file changed

+235
-0
lines changed

1 file changed

+235
-0
lines changed

llvm/test/Analysis/CostModel/PowerPC/insert_extract.ll

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
; 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
44
; 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
55
; 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
67

78
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"
89
target triple = "powerpc64-unknown-linux-gnu"
@@ -24,6 +25,10 @@ define i32 @insert(i32 %arg) {
2425
; CHECK-P9LE-LABEL: 'insert'
2526
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = insertelement <4 x i32> undef, i32 %arg, i32 0
2627
; 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
2732
;
2833
%x = insertelement <4 x i32> undef, i32 %arg, i32 0
2934
ret i32 undef
@@ -46,6 +51,10 @@ define i32 @extract(<4 x i32> %arg) {
4651
; CHECK-P9LE-LABEL: 'extract'
4752
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <4 x i32> %arg, i32 0
4853
; 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
4958
;
5059
%x = extractelement <4 x i32> %arg, i32 0
5160
ret i32 %x
@@ -71,6 +80,11 @@ define void @test2xdouble(<2 x double> %arg1) {
7180
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = extractelement <2 x double> %arg1, i32 0
7281
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement <2 x double> %arg1, i32 1
7382
; 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
7488
;
7589
%v1 = extractelement <2 x double> %arg1, i32 0
7690
%v2 = extractelement <2 x double> %arg1, i32 1
@@ -93,6 +107,10 @@ define void @test4xi32(<4 x i32> %v1, i32 %x1) {
93107
; CHECK-P9LE-LABEL: 'test4xi32'
94108
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 2
95109
; 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
96114
;
97115
%v2 = insertelement <4 x i32> %v1, i32 %x1, i32 2
98116
ret void
@@ -126,6 +144,13 @@ define void @vexti32(<4 x i32> %p1) {
126144
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2
127145
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3
128146
; 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
129154
;
130155
%i1 = extractelement <4 x i32> %p1, i32 0
131156
%i2 = extractelement <4 x i32> %p1, i32 1
@@ -154,6 +179,11 @@ define void @vexti64(<2 x i64> %p1) {
154179
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0
155180
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1
156181
; 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
157187
;
158188
%i1 = extractelement <2 x i64> %p1, i32 0
159189
%i2 = extractelement <2 x i64> %p1, i32 1
@@ -180,8 +210,213 @@ define void @vext(<8 x i16> %p1, <16 x i8> %p2) {
180210
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0
181211
; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0
182212
; 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
183218
;
184219
%i1 = extractelement <8 x i16> %p1, i32 0
185220
%i2 = extractelement <16 x i8> %p2, i32 0
186221
ret void
187222
}
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

Comments
 (0)