summaryrefslogtreecommitdiff
path: root/test/Transforms/LICM/sink_critical_edge.ll
blob: bc8f2b2cf25b30ab5a735f1f9ae0f39306f3fe04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; This testcase checks to make sure the sinker does not cause problems with
; critical edges.

; RUN: llvm-upgrade < %s | llvm-as | opt -licm | llvm-dis | %prcontext add 1 | grep Exit

implementation   ; Functions:

void %test() {
Entry:
	br bool false, label %Loop, label %Exit

Loop:
	%X = add int 0, 1
	br bool false, label %Loop, label %Exit

Exit:
	%Y = phi int [ 0, %Entry ], [ %X, %Loop ]
	ret void
}