1; RUN: llc < %s
2
3target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32"
4target triple = "thumbv6t2-elf"
5	%struct.dwarf_cie = type <{ i32, i32, i8, [0 x i8], [3 x i8] }>
6
7declare i8* @read_sleb128(i8*, i32* nocapture) nounwind
8
9define i32 @get_cie_encoding(%struct.dwarf_cie* %cie) nounwind {
10entry:
11	br i1 undef, label %bb1, label %bb13
12
13bb1:		; preds = %entry
14	%tmp38 = add i32 undef, 10		; <i32> [#uses=1]
15	br label %bb.i
16
17bb.i:		; preds = %bb.i, %bb1
18	%indvar.i = phi i32 [ 0, %bb1 ], [ %2, %bb.i ]		; <i32> [#uses=3]
19	%tmp39 = add i32 %indvar.i, %tmp38		; <i32> [#uses=1]
20	%p_addr.0.i = getelementptr i8, i8* undef, i32 %tmp39		; <i8*> [#uses=1]
21	%0 = load i8, i8* %p_addr.0.i, align 1		; <i8> [#uses=1]
22	%1 = icmp slt i8 %0, 0		; <i1> [#uses=1]
23	%2 = add i32 %indvar.i, 1		; <i32> [#uses=1]
24	br i1 %1, label %bb.i, label %read_uleb128.exit
25
26read_uleb128.exit:		; preds = %bb.i
27	%.sum40 = add i32 %indvar.i, undef		; <i32> [#uses=1]
28	%.sum31 = add i32 %.sum40, 2		; <i32> [#uses=1]
29	%scevgep.i = getelementptr %struct.dwarf_cie, %struct.dwarf_cie* %cie, i32 0, i32 3, i32 %.sum31		; <i8*> [#uses=1]
30	%3 = call  i8* @read_sleb128(i8* %scevgep.i, i32* undef)		; <i8*> [#uses=0]
31	unreachable
32
33bb13:		; preds = %entry
34	ret i32 0
35}
36