For PR1319:
[oota-llvm.git] / test / Transforms / Inline / inline_dce.ll
1 ; This checks to ensure that the inline pass deletes functions if they get 
2 ; inlined into all of their callers.
3
4 ; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \
5 ; RUN:   not grep %reallysmall
6
7 implementation
8
9 internal int %reallysmall(int %A) {
10         ret int %A
11 }
12
13 void %caller1() {
14         call int %reallysmall(int 5)
15         ret void
16 }
17
18 void %caller2(int %A) {
19         call int %reallysmall(int %A)
20         ret void
21 }
22
23 int %caller3(int %A) {
24         %B = call int %reallysmall(int %A)
25         ret int %B
26 }