1 ; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm -f | FileCheck %s
3 %struct.A = type { i32* }
5 define arm_apcscc void @"\01-[MyFunction Name:]"() {
7 %save_filt.1 = alloca i32 ; <i32*> [#uses=2]
8 %save_eptr.0 = alloca i8* ; <i8**> [#uses=2]
9 %a = alloca %struct.A ; <%struct.A*> [#uses=3]
10 %eh_exception = alloca i8* ; <i8**> [#uses=5]
11 %eh_selector = alloca i32 ; <i32*> [#uses=3]
12 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
13 call arm_apcscc void @_ZN1AC1Ev(%struct.A* %a)
14 invoke arm_apcscc void @_Z3barv()
15 to label %invcont unwind label %lpad
17 invcont: ; preds = %entry
18 call arm_apcscc void @_ZN1AD1Ev(%struct.A* %a) nounwind
22 %eh_select = load i32* %eh_selector ; <i32> [#uses=1]
23 store i32 %eh_select, i32* %save_filt.1, align 4
24 %eh_value = load i8** %eh_exception ; <i8*> [#uses=1]
25 store i8* %eh_value, i8** %save_eptr.0, align 4
26 call arm_apcscc void @_ZN1AD1Ev(%struct.A* %a) nounwind
27 %0 = load i8** %save_eptr.0, align 4 ; <i8*> [#uses=1]
28 store i8* %0, i8** %eh_exception, align 4
29 %1 = load i32* %save_filt.1, align 4 ; <i32> [#uses=1]
30 store i32 %1, i32* %eh_selector, align 4
33 return: ; preds = %invcont
36 lpad: ; preds = %entry
37 %eh_ptr = call i8* @llvm.eh.exception() ; <i8*> [#uses=1]
38 store i8* %eh_ptr, i8** %eh_exception
39 %eh_ptr1 = load i8** %eh_exception ; <i8*> [#uses=1]
40 %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0) ; <i32> [#uses=1]
41 store i32 %eh_select2, i32* %eh_selector
48 %eh_ptr3 = load i8** %eh_exception ; <i8*> [#uses=1]
49 call arm_apcscc void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
53 define linkonce_odr arm_apcscc void @_ZN1AC1Ev(%struct.A* %this) {
55 %this_addr = alloca %struct.A* ; <%struct.A**> [#uses=2]
56 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
57 store %struct.A* %this, %struct.A** %this_addr
58 %0 = call arm_apcscc i8* @_Znwm(i32 4) ; <i8*> [#uses=1]
59 %1 = bitcast i8* %0 to i32* ; <i32*> [#uses=1]
60 %2 = load %struct.A** %this_addr, align 4 ; <%struct.A*> [#uses=1]
61 %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0 ; <i32**> [#uses=1]
62 store i32* %1, i32** %3, align 4
65 return: ; preds = %entry
69 declare arm_apcscc i8* @_Znwm(i32)
71 define linkonce_odr arm_apcscc void @_ZN1AD1Ev(%struct.A* %this) nounwind {
73 %this_addr = alloca %struct.A* ; <%struct.A**> [#uses=2]
74 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
75 store %struct.A* %this, %struct.A** %this_addr
76 %0 = load %struct.A** %this_addr, align 4 ; <%struct.A*> [#uses=1]
77 %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0 ; <i32**> [#uses=1]
78 %2 = load i32** %1, align 4 ; <i32*> [#uses=1]
79 %3 = bitcast i32* %2 to i8* ; <i8*> [#uses=1]
80 call arm_apcscc void @_ZdlPv(i8* %3) nounwind
91 declare arm_apcscc void @_ZdlPv(i8*) nounwind
93 declare arm_apcscc void @_Z3barv()
95 declare i8* @llvm.eh.exception() nounwind
97 declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) nounwind
99 declare i32 @llvm.eh.typeid.for.i32(i8*) nounwind
101 declare arm_apcscc i32 @__gxx_personality_sj0(...)
103 declare arm_apcscc void @_Unwind_SjLj_Resume(i8*)