Remove llvm-upgrade and update test cases.
[oota-llvm.git] / test / Transforms / Inline / alloca_test.ll
1 ; This test ensures that alloca instructions in the entry block for an inlined
2 ; function are moved to the top of the function they are inlined into.
3 ;
4 ; RUN: llvm-as < %s | opt -inline | llvm-dis | %prcontext alloca 1 | grep Entry:
5
6 define i32 @func(i32 %i) {
7         %X = alloca i32         ; <i32*> [#uses=1]
8         store i32 %i, i32* %X
9         ret i32 %i
10 }
11
12 declare void @bar()
13
14 define i32 @main(i32 %argc) {
15 Entry:
16         call void @bar( )
17         %X = call i32 @func( i32 7 )            ; <i32> [#uses=1]
18         %Y = add i32 %X, %argc          ; <i32> [#uses=1]
19         ret i32 %Y
20 }
21