llvm-6502/test/Transforms/Inline/alloca_test.ll
Chris Lattner c9c41ee9d0 Change tests to use testrunner
new test


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6399 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 15:16:10 +00:00

20 lines
409 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: as < %s | opt -inline | dis | grep -C 1 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
}