summaryrefslogtreecommitdiff
path: root/test/Transforms/SCCP/ipsccp-gvar.ll
blob: add1ee66637c16aba845f3dbec389a3d8c067559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep global

%G = internal global int undef

implementation

void %foo() {
	%X = load int* %G
	store int %X, int* %G
	ret void
}

int %bar() {
	%V = load int* %G
	%C = seteq int %V, 17
	br bool %C, label %T, label %F
T:
	store int 17, int* %G
	ret int %V
F:
	store int 123, int* %G
	ret int 0
}