Use the llvm-upgrade program to upgrade llvm assembly.
[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-upgrade < %s | llvm-as | opt -inline | llvm-dis | %prcontext alloca 1 | grep Entry:
5
6 int %func(int %i) {
7         %X = alloca int 
8         store int %i, int* %X
9         ret int %i
10 }
11
12 declare void %bar()
13
14 int %main(int %argc) {
15 Entry:
16         call void %bar()
17         %X = call int %func(int 7)
18         %Y = add int %X, %argc
19         ret int %Y
20 }