mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-15 04:08:07 +00:00
69ccadd753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
460 B
LLVM
21 lines
460 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-upgrade < %s | llvm-as | opt -inline | llvm-dis | %prcontext alloca 1 | grep Entry:
|
|
|
|
int %func(int %i) {
|
|
%X = alloca int
|
|
store int %i, int* %X
|
|
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
|
|
}
|