Use the llvm-upgrade program to upgrade llvm assembly.
[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 | not grep %reallysmall
5
6 implementation
7
8 internal int %reallysmall(int %A) {
9         ret int %A
10 }
11
12 void %caller1() {
13         call int %reallysmall(int 5)
14         ret void
15 }
16
17 void %caller2(int %A) {
18         call int %reallysmall(int %A)
19         ret void
20 }
21
22 int %caller3(int %A) {
23         %B = call int %reallysmall(int %A)
24         ret int %B
25 }