Skip to content

Commit b42f8ec

Browse files
committed
[AArch64] Update a number of costmodel tests with -cost-kind=all. NFC
1 parent 123c004 commit b42f8ec

22 files changed

+2939
-3131
lines changed

llvm/test/Analysis/CostModel/AArch64/aggregates.ll

Lines changed: 25 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,66 @@
11
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2-
; RUN: opt < %s -mtriple=aarch64-linux-gnu -passes="print<cost-model>" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s --check-prefix=THROUGHPUT
3-
; RUN: opt < %s -mtriple=aarch64-linux-gnu -passes="print<cost-model>" -cost-kind=latency 2>&1 -disable-output | FileCheck %s --check-prefix=LATENCY
4-
; RUN: opt < %s -mtriple=aarch64-linux-gnu -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output | FileCheck %s --check-prefix=CODESIZE
2+
; RUN: opt < %s -mtriple=aarch64-linux-gnu -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output | FileCheck %s
53

64
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
75

86
define i32 @extract_first_i32({i32, i32} %agg) {
9-
; THROUGHPUT-LABEL: 'extract_first_i32'
10-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0
11-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r
12-
;
13-
; LATENCY-LABEL: 'extract_first_i32'
14-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0
15-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
16-
;
17-
; CODESIZE-LABEL: 'extract_first_i32'
18-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0
19-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
7+
; CHECK-LABEL: 'extract_first_i32'
8+
; CHECK-NEXT: Cost Model: Found costs of 0 for: %r = extractvalue { i32, i32 } %agg, 0
9+
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 %r
2010
;
2111
%r = extractvalue {i32, i32} %agg, 0
2212
ret i32 %r
2313
}
2414

2515
define i32 @extract_second_i32({i32, i32} %agg) {
26-
; THROUGHPUT-LABEL: 'extract_second_i32'
27-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1
28-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r
29-
;
30-
; LATENCY-LABEL: 'extract_second_i32'
31-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1
32-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
33-
;
34-
; CODESIZE-LABEL: 'extract_second_i32'
35-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1
36-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
16+
; CHECK-LABEL: 'extract_second_i32'
17+
; CHECK-NEXT: Cost Model: Found costs of 0 for: %r = extractvalue { i32, i32 } %agg, 1
18+
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 %r
3719
;
3820
%r = extractvalue {i32, i32} %agg, 1
3921
ret i32 %r
4022
}
4123

4224
define i32 @extract_i32({i32, i1} %agg) {
43-
; THROUGHPUT-LABEL: 'extract_i32'
44-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0
45-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r
46-
;
47-
; LATENCY-LABEL: 'extract_i32'
48-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0
49-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
50-
;
51-
; CODESIZE-LABEL: 'extract_i32'
52-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0
53-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r
25+
; CHECK-LABEL: 'extract_i32'
26+
; CHECK-NEXT: Cost Model: Found costs of 0 for: %r = extractvalue { i32, i1 } %agg, 0
27+
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 %r
5428
;
5529
%r = extractvalue {i32, i1} %agg, 0
5630
ret i32 %r
5731
}
5832

5933
define i1 @extract_i1({i32, i1} %agg) {
60-
; THROUGHPUT-LABEL: 'extract_i1'
61-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1
62-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i1 %r
63-
;
64-
; LATENCY-LABEL: 'extract_i1'
65-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1
66-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i1 %r
67-
;
68-
; CODESIZE-LABEL: 'extract_i1'
69-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1
70-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i1 %r
34+
; CHECK-LABEL: 'extract_i1'
35+
; CHECK-NEXT: Cost Model: Found costs of 0 for: %r = extractvalue { i32, i1 } %agg, 1
36+
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i1 %r
7137
;
7238
%r = extractvalue {i32, i1} %agg, 1
7339
ret i1 %r
7440
}
7541

7642
define float @extract_float({i32, float} %agg) {
77-
; THROUGHPUT-LABEL: 'extract_float'
78-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1
79-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %r
80-
;
81-
; LATENCY-LABEL: 'extract_float'
82-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1
83-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %r
84-
;
85-
; CODESIZE-LABEL: 'extract_float'
86-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1
87-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %r
43+
; CHECK-LABEL: 'extract_float'
44+
; CHECK-NEXT: Cost Model: Found costs of 0 for: %r = extractvalue { i32, float } %agg, 1
45+
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret float %r
8846
;
8947
%r = extractvalue {i32, float} %agg, 1
9048
ret float %r
9149
}
9250

9351
define [42 x i42] @extract_array({i32, [42 x i42]} %agg) {
94-
; THROUGHPUT-LABEL: 'extract_array'
95-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
96-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret [42 x i42] %r
97-
;
98-
; LATENCY-LABEL: 'extract_array'
99-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
100-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret [42 x i42] %r
101-
;
102-
; CODESIZE-LABEL: 'extract_array'
103-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1
104-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret [42 x i42] %r
52+
; CHECK-LABEL: 'extract_array'
53+
; CHECK-NEXT: Cost Model: Found costs of 0 for: %r = extractvalue { i32, [42 x i42] } %agg, 1
54+
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret [42 x i42] %r
10555
;
10656
%r = extractvalue {i32, [42 x i42]} %agg, 1
10757
ret [42 x i42] %r
10858
}
10959

11060
define <42 x i42> @extract_vector({i32, <42 x i42>} %agg) {
111-
; THROUGHPUT-LABEL: 'extract_vector'
112-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
113-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <42 x i42> %r
114-
;
115-
; LATENCY-LABEL: 'extract_vector'
116-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
117-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <42 x i42> %r
118-
;
119-
; CODESIZE-LABEL: 'extract_vector'
120-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1
121-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <42 x i42> %r
61+
; CHECK-LABEL: 'extract_vector'
62+
; CHECK-NEXT: Cost Model: Found costs of 0 for: %r = extractvalue { i32, <42 x i42> } %agg, 1
63+
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <42 x i42> %r
12264
;
12365
%r = extractvalue {i32, <42 x i42>} %agg, 1
12466
ret <42 x i42> %r
@@ -127,17 +69,9 @@ define <42 x i42> @extract_vector({i32, <42 x i42>} %agg) {
12769
%T1 = type { i32, float, <4 x i1> }
12870

12971
define %T1 @extract_struct({i32, %T1} %agg) {
130-
; THROUGHPUT-LABEL: 'extract_struct'
131-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
132-
; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret %T1 %r
133-
;
134-
; LATENCY-LABEL: 'extract_struct'
135-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
136-
; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret %T1 %r
137-
;
138-
; CODESIZE-LABEL: 'extract_struct'
139-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1
140-
; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret %T1 %r
72+
; CHECK-LABEL: 'extract_struct'
73+
; CHECK-NEXT: Cost Model: Found costs of 0 for: %r = extractvalue { i32, %T1 } %agg, 1
74+
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret %T1 %r
14175
;
14276
%r = extractvalue {i32, %T1} %agg, 1
14377
ret %T1 %r

0 commit comments

Comments
 (0)