blob: 5cb118f7283c2b1fcefd54449bda5405beca6b43 [file] [log] [blame]
Chris Lattner1f714012003-08-24 05:02:26 +00001; This checks to ensure that the inline pass deletes functions if they get
2; inlined into all of their callers.
3
Reid Spencer951d8dc2007-04-15 08:30:33 +00004; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \
5; RUN: not grep %reallysmall
Chris Lattner1f714012003-08-24 05:02:26 +00006
7implementation
8
9internal int %reallysmall(int %A) {
10 ret int %A
11}
12
13void %caller1() {
14 call int %reallysmall(int 5)
15 ret void
16}
17
18void %caller2(int %A) {
19 call int %reallysmall(int %A)
20 ret void
21}
22
23int %caller3(int %A) {
24 %B = call int %reallysmall(int %A)
25 ret int %B
26}