aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll
blob: 955e70b8e95345d9ef1bccf523d60cf5a2168ffc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: llvm-upgrade < %s | llvm-as | opt -licm | lli

implementation   ; Functions:

int %main() {
entry:
	br label %Loop

Loop:
	br bool true, label %LoopCont, label %Out
LoopCont:
	%X = add int 1, 0
	br bool true, label %Out, label %Loop

Out:
	%V = phi int [ 2, %Loop], [ %X, %LoopCont]
	%V2 = sub int %V, 1
	ret int %V2
}