aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG/switch_create.ll
blob: 95d7d4a0f641f93a369dabf724ba16f842778e84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br

declare void %foo1()
declare void %foo2()

void %test1(uint %V) {
	%C1 = seteq uint %V, 4
	%C2 = seteq uint %V, 17
	%CN = or bool %C1, %C2
	br bool %CN, label %T, label %F
T:
	call void %foo1()
	ret void
F:
	call void %foo2()
	ret void
}


void %test2(int %V) {
	%C1 = setne int %V, 4
	%C2 = setne int %V, 17
	%CN = and bool %C1, %C2
	br bool %CN, label %T, label %F
T:
	call void %foo1()
	ret void
F:
	call void %foo2()
	ret void
}