1 ; RUN: llc < %s -verify-machineinstrs
2 ; <rdar://problem/9187612>
3 target 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-n32"
4 target triple = "thumbv7-apple-darwin"
6 define void @func() unnamed_addr align 2 {
11 %tmp2 = phi i32 [ 0, %entry ], [ %add, %for.cond.backedge ]
12 %cmp = icmp ult i32 %tmp2, 14
13 br i1 %cmp, label %for.body, label %for.end
16 %add = add i32 %tmp2, 1
17 switch i32 %tmp2, label %sw.default [
28 to label %invoke.cont17 unwind label %lpad
32 to label %for.cond.backedge unwind label %lpad26
38 %exn = tail call i8* @llvm.eh.exception() nounwind
39 %eh.selector = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
41 to label %eh.resume unwind label %terminate.lpad
44 %exn27 = tail call i8* @llvm.eh.exception() nounwind
45 %eh.selector28 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn27, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
47 to label %eh.resume unwind label %terminate.lpad
50 br label %for.cond.backedge
54 to label %call8.i.i.i.noexc unwind label %lpad44
60 %exn45 = tail call i8* @llvm.eh.exception() nounwind
61 %eh.selector46 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn45, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
63 to label %eh.resume unwind label %terminate.lpad
66 %exn.slot.0 = phi i8* [ %exn27, %lpad26 ], [ %exn, %lpad ], [ %exn45, %lpad44 ]
67 tail call void @_Unwind_SjLj_Resume_or_Rethrow(i8* %exn.slot.0) noreturn
71 %exn51 = tail call i8* @llvm.eh.exception() nounwind
72 %eh.selector52 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn51, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i8* null) nounwind
73 tail call void @_ZSt9terminatev() noreturn nounwind
79 declare i8* @llvm.eh.exception() nounwind readonly
81 declare i32 @__gxx_personality_sj0(...)
83 declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
85 declare void @_Unwind_SjLj_Resume_or_Rethrow(i8*)
87 declare void @_ZSt9terminatev()
89 !0 = metadata !{metadata !"any pointer", metadata !1}
90 !1 = metadata !{metadata !"omnipotent char", metadata !2}
91 !2 = metadata !{metadata !"Simple C/C++ TBAA", null}
92 !3 = metadata !{metadata !"bool", metadata !1}
93 !4 = metadata !{metadata !"int", metadata !1}