Skip to content

Commit 391483d

Browse files
committed
baseline for filechecks
1 parent 4eb9066 commit 391483d

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
; RUN: opt < %s -passes=inline -inline-threshold=100 -S | FileCheck %s
2+
; RUN: opt < %s -mtriple=aarch64-windows-msvc -passes=inline -inline-threshold=100 -S | FileCheck %s
3+
4+
define i32 @nosection_callee(i32 %x) {
5+
%x1 = add i32 %x, 1
6+
%x2 = add i32 %x1, 1
7+
%x3 = add i32 %x2, 1
8+
call void @extern()
9+
ret i32 %x3
10+
}
11+
12+
define i32 @section_callee(i32 %x) section "FOO" {
13+
%x1 = add i32 %x, 1
14+
%x2 = add i32 %x1, 1
15+
%x3 = add i32 %x2, 1
16+
call void @extern()
17+
ret i32 %x3
18+
}
19+
20+
define i32 @sectionpostfix_callee(i32 %x) section "FOO$BBBB" {
21+
%x1 = add i32 %x, 1
22+
%x2 = add i32 %x1, 1
23+
%x3 = add i32 %x2, 1
24+
call void @extern()
25+
ret i32 %x3
26+
}
27+
28+
define i32 @paged_callee(i32 %x) section "PAGE" {
29+
%x1 = add i32 %x, 1
30+
%x2 = add i32 %x1, 1
31+
%x3 = add i32 %x2, 1
32+
call void @extern()
33+
ret i32 %x3
34+
}
35+
36+
define i32 @pagedpostfix_callee(i32 %x) section "PAGE$aaa" {
37+
%x1 = add i32 %x, 1
38+
%x2 = add i32 %x1, 1
39+
%x3 = add i32 %x2, 1
40+
call void @extern()
41+
ret i32 %x3
42+
}
43+
44+
define i32 @nosection_caller(i32 %y1) {
45+
%y2 = call i32 @nosection_callee(i32 %y1)
46+
%y3 = call i32 @section_callee(i32 %y2)
47+
%y4 = call i32 @sectionpostfix_callee(i32 %y3)
48+
%y5 = call i32 @paged_callee(i32 %y4)
49+
%y6 = call i32 @pagedpostfix_callee(i32 %y5)
50+
ret i32 %y6
51+
}
52+
53+
define i32 @section_caller(i32 %y1) section "FOO" {
54+
%y2 = call i32 @nosection_callee(i32 %y1)
55+
%y3 = call i32 @section_callee(i32 %y2)
56+
%y4 = call i32 @sectionpostfix_callee(i32 %y3)
57+
%y5 = call i32 @paged_callee(i32 %y4)
58+
%y6 = call i32 @pagedpostfix_callee(i32 %y5)
59+
ret i32 %y6
60+
}
61+
62+
define i32 @sectionpostfix_caller(i32 %y1) section "FOO$ZZZ" {
63+
%y2 = call i32 @nosection_callee(i32 %y1)
64+
%y3 = call i32 @section_callee(i32 %y2)
65+
%y4 = call i32 @sectionpostfix_callee(i32 %y3)
66+
%y5 = call i32 @paged_callee(i32 %y4)
67+
%y6 = call i32 @pagedpostfix_callee(i32 %y5)
68+
ret i32 %y6
69+
}
70+
71+
define i32 @paged_caller(i32 %y1) section "PAGE" {
72+
%y2 = call i32 @nosection_callee(i32 %y1)
73+
%y3 = call i32 @section_callee(i32 %y2)
74+
%y4 = call i32 @sectionpostfix_callee(i32 %y3)
75+
%y5 = call i32 @paged_callee(i32 %y4)
76+
%y6 = call i32 @pagedpostfix_callee(i32 %y5)
77+
ret i32 %y6
78+
}
79+
80+
define i32 @pagedpostfix_caller(i32 %y1) section "PAGE$ZZZ" {
81+
%y2 = call i32 @nosection_callee(i32 %y1)
82+
%y3 = call i32 @section_callee(i32 %y2)
83+
%y4 = call i32 @sectionpostfix_callee(i32 %y3)
84+
%y5 = call i32 @paged_callee(i32 %y4)
85+
%y6 = call i32 @pagedpostfix_callee(i32 %y5)
86+
ret i32 %y6
87+
}
88+
89+
90+
declare void @extern()
91+
92+
; CHECK-LABEL: @paged_callee

0 commit comments

Comments
 (0)