summaryrefslogtreecommitdiff
path: root/test/Transforms/GlobalOpt/undef-init.llx
blob: f4e110130e4f31fdbfd19ba8f3b708331ed60c40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep store

%llvm.global_ctors = appending global [1 x { int, void ()* }] [ { int, void ()* } { int 65535, void ()* %_GLOBAL__I__Z3foov } ]		; <[1 x { int, void ()* }]*> [#uses=0]
%X.0 = internal global int undef		; <int*> [#uses=2]

implementation   ; Functions:

int %_Z3foov() {
entry:
	%tmp.1 = load int* %X.0		; <int> [#uses=1]
	ret int %tmp.1
}

internal void %_GLOBAL__I__Z3foov() {
entry:
	store int 1, int* %X.0
	ret void
}