mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
91974939d0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47225 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
529 B
LLVM
22 lines
529 B
LLVM
; RUN: llvm-as < %s | opt -inline | llvm-dis | \
|
|
; RUN: not grep {%G = alloca int}
|
|
|
|
; 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 i32 7 ; <i32*> [#uses=1]
|
|
|
|
define i32 @main() {
|
|
%G = alloca i32 ; <i32*> [#uses=2]
|
|
store i32 0, i32* %G
|
|
call void @bar( )
|
|
%RV = load i32* %G ; <i32> [#uses=1]
|
|
ret i32 %RV
|
|
}
|
|
|
|
define internal void @bar() {
|
|
store i32 123, i32* @G
|
|
ret void
|
|
}
|
|
|
|
|