mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 00:11:00 +00:00
14285c89e7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8544 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
500 B
LLVM
22 lines
500 B
LLVM
; This tests to make sure that G ends up in the globals graph of the BU pass.
|
|
; If it is not, then %G will get converted to a 'constant' from a 'global'
|
|
;
|
|
; RUN: llvm-as < %s | opt -ds-opt -globaldce | llvm-dis | grep %G
|
|
|
|
|
|
%G = internal global int 0 ; <int*> [#uses=2]
|
|
|
|
implementation ; Functions:
|
|
|
|
internal void %foo() {
|
|
%tmp.0 = load int* %G ; <int> [#uses=1]
|
|
%tmp.1 = add int %tmp.0, 1 ; <int> [#uses=1]
|
|
store int %tmp.1, int* %G
|
|
ret void
|
|
}
|
|
|
|
int %main() {
|
|
call void %foo( )
|
|
ret int 0
|
|
}
|