1 ; RUN: llc -mtriple=armv7-none-linux-gnueabi -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
3 @_ZTVN10__cxxabiv117__class_type_infoE = external global ptr
4 @_ZTS3Foo = linkonce_odr constant [5 x i8] c"3Foo\00"
5 @_ZTI3Foo = linkonce_odr unnamed_addr constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i32 2), ptr @_ZTS3Foo }
7 define i32 @main() personality ptr @__gxx_personality_v0 {
10 to label %return unwind label %lpad
12 lpad: ; preds = %entry
13 %0 = landingpad { ptr, i32 }
15 %1 = extractvalue { ptr, i32 } %0, 1
16 %2 = tail call i32 @llvm.eh.typeid.for(ptr @_ZTI3Foo) nounwind
17 ; CHECK: _ZTI3Foo(target2)
19 %matches = icmp eq i32 %1, %2
20 br i1 %matches, label %catch, label %eh.resume
22 catch: ; preds = %lpad
23 %3 = extractvalue { ptr, i32 } %0, 0
24 %4 = tail call ptr @__cxa_begin_catch(ptr %3) nounwind
25 tail call void @__cxa_end_catch()
28 return: ; preds = %entry, %catch
29 %retval.0 = phi i32 [ 1, %catch ], [ 0, %entry ]
32 eh.resume: ; preds = %lpad
33 resume { ptr, i32 } %0
36 declare void @_Z3foov()
38 declare i32 @__gxx_personality_v0(...)
40 declare i32 @llvm.eh.typeid.for(ptr) nounwind readnone
42 declare ptr @__cxa_begin_catch(ptr)
44 declare void @__cxa_end_catch()