1 ; RUN: llc -mtriple=arm-netbsd-eabi -o - -filetype=asm %s | \
3 ; RUN: llc -mtriple=arm-netbsd-eabi -o - -filetype=asm %s \
4 ; RUN: -relocation-model=pic | FileCheck -check-prefix=CHECK-PIC %s
7 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S64"
8 target triple = "armv5e--netbsd-eabi"
10 %struct.exception = type { i8 }
12 @_ZTVN10__cxxabiv117__class_type_infoE = external global i8*
13 @_ZTS9exception = linkonce_odr constant [11 x i8] c"9exception\00"
14 @_ZTI9exception = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @_ZTS9exception, i32 0, i32 0) }
16 define void @f() uwtable personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
19 %e = alloca %struct.exception*, align 4
21 to label %3 unwind label %4
25 %5 = landingpad { i8*, i32 }
26 catch i8* bitcast ({ i8*, i8* }* @_ZTI9exception to i8*)
27 %6 = extractvalue { i8*, i32 } %5, 0
29 %7 = extractvalue { i8*, i32 } %5, 1
33 %9 = load i32, i32* %2
34 %10 = call i32 @llvm.eh.typeid.for(i8* bitcast ({ i8*, i8* }* @_ZTI9exception to i8*)) nounwind
35 %11 = icmp eq i32 %9, %10
36 br i1 %11, label %12, label %17
38 %13 = load i8*, i8** %1
39 %14 = call i8* @__cxa_begin_catch(i8* %13) #3
40 %15 = bitcast i8* %14 to %struct.exception*
41 store %struct.exception* %15, %struct.exception** %e
42 call void @__cxa_end_catch()
47 %18 = load i8*, i8** %1
48 %19 = load i32, i32* %2
49 %20 = insertvalue { i8*, i32 } undef, i8* %18, 0
50 %21 = insertvalue { i8*, i32 } %20, i32 %19, 1
51 resume { i8*, i32 } %21
56 declare i32 @__gxx_personality_v0(...)
58 declare i32 @llvm.eh.typeid.for(i8*) nounwind readnone
60 declare i8* @__cxa_begin_catch(i8*)
62 declare void @__cxa_end_catch()
64 ; CHECK: .cfi_personality 0,
66 ; CHECK: @TType Encoding = absptr
67 ; CHECK: @ Call site Encoding = uleb128
68 ; CHECK-PIC: .cfi_personality 155,
69 ; CHECK-PIC: .cfi_lsda 27,
70 ; CHECK-PIC: @TType Encoding = indirect pcrel sdata4
71 ; CHECK-PIC: @ Call site Encoding = uleb128