2007-04-15 18:07:55 +08:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \
|
|
|
|
; RUN: not grep {%G = alloca int}
|
2004-12-05 14:18:35 +08:00
|
|
|
|
|
|
|
; In this testcase, %bar stores to the global G. Make sure that inlining does
|
|
|
|
; not cause it to store to the G in main instead.
|
|
|
|
|
|
|
|
%G = global int 7
|
|
|
|
|
|
|
|
int %main() {
|
|
|
|
%G = alloca int
|
|
|
|
store int 0, int* %G
|
|
|
|
call void %bar()
|
|
|
|
%RV = load int* %G
|
|
|
|
ret int %RV
|
|
|
|
}
|
|
|
|
|
|
|
|
internal void %bar() {
|
|
|
|
store int 123, int* %G
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|