1 ; RUN: llc < %s -O0 -mtriple=thumbv7-apple-ios | FileCheck %s
3 ; Radar 10567930: Make sure that all the caller-saved registers are saved and
4 ; restored in a function with setjmp/longjmp EH. In particular, r6 was not
6 ; CHECK: push {r4, r5, r6, r7, lr}
9 %struct.NSConstantString = type { ptr, i32, ptr, i32 }
11 define i32 @asdf(i32 %a, i32 %b, ptr %c, ptr %d) personality ptr @__objc_personality_v0 {
13 %tmp = alloca i32, align 4
14 %tmp1 = alloca i32, align 4
15 %tmp2 = alloca ptr, align 4
17 %myException = alloca ptr, align 4
20 %exception = alloca ptr, align 4
21 store i32 %a, ptr %tmp, align 4
22 store i32 %b, ptr %tmp1, align 4
23 store ptr %d, ptr %tmp2, align 4
24 store i1 false, ptr %tmp3
25 %tmp7 = load ptr, ptr %c
26 %tmp10 = invoke ptr @objc_msgSend(ptr %tmp7, ptr %d, ptr null)
27 to label %bb11 unwind label %bb15
30 store ptr %tmp10, ptr %myException, align 4
31 %tmp12 = load ptr, ptr %myException, align 4
32 invoke void @objc_exception_throw(ptr %tmp12) noreturn
33 to label %bb14 unwind label %bb15
38 bb15: ; preds = %bb11, %bb
39 %tmp16 = landingpad { ptr, i32 }
41 %tmp17 = extractvalue { ptr, i32 } %tmp16, 0
42 store ptr %tmp17, ptr %tmp4
43 %tmp18 = extractvalue { ptr, i32 } %tmp16, 1
44 store i32 %tmp18, ptr %tmp5
45 store i1 true, ptr %tmp3
52 declare ptr @objc_msgSend(ptr, ptr, ...) nonlazybind
53 declare i32 @__objc_personality_v0(...)
54 declare void @objc_exception_throw(ptr)