[ARM] Enable shrink-wrapping by default.
[oota-llvm.git] / test / CodeGen / ARM / arm-ttype-target2.ll
1 ; RUN: llc -mtriple=armv7-none-linux-gnueabi < %s | FileCheck %s
2
3 @_ZTVN10__cxxabiv117__class_type_infoE = external global i8*
4 @_ZTS3Foo = linkonce_odr constant [5 x i8] c"3Foo\00"
5 @_ZTI3Foo = 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 ([5 x i8], [5 x i8]* @_ZTS3Foo, i32 0, i32 0) }
6
7 define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
8 entry:
9   invoke void @_Z3foov()
10           to label %return unwind label %lpad
11
12 lpad:                                             ; preds = %entry
13   %0 = landingpad { i8*, i32 }
14           catch i8* bitcast ({ i8*, i8* }* @_ZTI3Foo to i8*)
15   %1 = extractvalue { i8*, i32 } %0, 1
16   %2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast ({ i8*, i8* }* @_ZTI3Foo to i8*)) nounwind
17 ; CHECK: _ZTI3Foo(target2)
18
19   %matches = icmp eq i32 %1, %2
20   br i1 %matches, label %catch, label %eh.resume
21
22 catch:                                            ; preds = %lpad
23   %3 = extractvalue { i8*, i32 } %0, 0
24   %4 = tail call i8* @__cxa_begin_catch(i8* %3) nounwind
25   tail call void @__cxa_end_catch()
26   br label %return
27
28 return:                                           ; preds = %entry, %catch
29   %retval.0 = phi i32 [ 1, %catch ], [ 0, %entry ]
30   ret i32 %retval.0
31
32 eh.resume:                                        ; preds = %lpad
33   resume { i8*, i32 } %0
34 }
35
36 declare void @_Z3foov()
37
38 declare i32 @__gxx_personality_v0(...)
39
40 declare i32 @llvm.eh.typeid.for(i8*) nounwind readnone
41
42 declare i8* @__cxa_begin_catch(i8*)
43
44 declare void @__cxa_end_catch()