summaryrefslogtreecommitdiffstats
path: root/llvm/test/Regression/Transforms/SimplifyCFG/branch-phi-thread.ll
blob: 9098376ba46a5b6185d9f9330bf2716746211ee5 (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
; RUN: llvm-as < %s | opt -simplifycfg -adce | llvm-dis | not grep 'call void %f1'
declare void %f1()
declare void %f2()
declare void %f3()
declare void %f4()

implementation

int %test2(int %X, bool %D) {
E:
	%C = seteq int %X, 0
	br bool %C, label %T, label %F
T:
	%P = phi bool [true, %E], [%C, %A]
	br bool %P, label %B, label %A
A:
	call void %f1()
	br bool %D, label %T, label %F
B:
	call void %f2()
	ret int 345
F:
	call void %f3()
	ret int 123
}

OpenPOWER on IntegriCloud