• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; This checks to ensure that the inline pass deletes functions if they get
2; inlined into all of their callers.
3
4; RUN: opt < %s -inline -S | \
5; RUN:   not grep @reallysmall
6
7define internal i32 @reallysmall(i32 %A) {
8; CHECK-NOT: @reallysmall
9entry:
10  ret i32 %A
11}
12
13define void @caller1() {
14; CHECK-LABEL: define void @caller1()
15entry:
16  call i32 @reallysmall(i32 5)
17; CHECK-NOT: call
18  ret void
19}
20
21define void @caller2(i32 %A) {
22; CHECK-LABEL: define void @caller2(i32 %A)
23entry:
24  call i32 @reallysmall(i32 %A)
25; CHECK-NOT: call
26  ret void
27}
28
29define i32 @caller3(i32 %A) {
30; CHECK-LABEL: define void @caller3(i32 %A)
31entry:
32  %B = call i32 @reallysmall(i32 %A)
33; CHECK-NOT: call
34  ret i32 %B
35}
36
37