Constant propagation after hiting llvm.assume
[oota-llvm.git] / test / Transforms / GVN / 2011-09-07-TypeIdFor.ll
index eeaf998e72c169a0069e7d065c7cdad90d4f6d77..d6b69d3eb4e8651a96f07a5efdcb41f6278ba5c5 100644 (file)
@@ -7,6 +7,8 @@
 
 declare void @_Z4barv()
 
+declare void @_Z7cleanupv()
+
 declare i32 @llvm.eh.typeid.for(i8*) nounwind readonly
 
 declare i8* @__cxa_begin_catch(i8*) nounwind
@@ -15,13 +17,13 @@ declare void @__cxa_end_catch()
 
 declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*)
 
-define void @_Z3foov() uwtable {
+define void @_Z3foov() uwtable personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 {
 entry:
   invoke void @_Z4barv()
           to label %return unwind label %lpad
 
 lpad:                                             ; preds = %entry
-  %0 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0
+  %0 = landingpad { i8*, i32 }
           catch %struct.__fundamental_type_info_pseudo* @_ZTIi
           catch %struct.__fundamental_type_info_pseudo* @_ZTIb
           catch %struct.__fundamental_type_info_pseudo* @_ZTIi
@@ -50,6 +52,7 @@ ppad2:                                            ; preds = %next
   br label %return
 
 next2:                                            ; preds = %next
+  call void @_Z7cleanupv()
   %typeid = tail call i32 @llvm.eh.typeid.for(i8* bitcast (%struct.__fundamental_type_info_pseudo* @_ZTIi to i8*))
 ; CHECK-NOT: call i32 @llvm.eh.typeid.for
   %4 = icmp eq i32 %filter3.i, %typeid