aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll
blob: 5c1f77b6eea04ab752115442d33d61ca1e85ff57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; RUN: opt < %s -jump-threading | llvm-dis
; PR3353

define i32 @test(i8 %X) {
entry:
	%Y = add i8 %X, 1
	%Z = add i8 %Y, 1
	br label %bb33.i

bb33.i:		; preds = %bb33.i, %bb32.i
	switch i8 %Y, label %bb32.i [
		i8 39, label %bb35.split.i
		i8 13, label %bb33.i
	]

bb35.split.i:
	ret i32 5
bb32.i:
	ret i32 1
}