1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 14:32:51 +01:00
llvm-mirror/test/Regression/Transforms/Inline/alloca_test.ll
Chris Lattner 070d2c2bf7 Improve portability with Mac OS/X
llvm-svn: 10338
2003-12-09 16:49:12 +00:00

20 lines
418 B
LLVM

; This test ensures that alloca instructions in the entry block for an inlined
; function are moved to the top of the function they are inlined into.
;
; RUN: llvm-as < %s | opt -inline | llvm-dis | grep -C1 alloca | grep Entry:
int %func(int %i) {
%X = alloca int
ret int %i
}
declare void %bar()
int %main(int %argc) {
Entry:
call void %bar()
%X = call int %func(int 7)
%Y = add int %X, %argc
ret int %Y
}