Update more tests to the new EH scheme.

llvm-svn: 138903
diff --git a/llvm/test/CodeGen/X86/2007-05-07-InvokeSRet.ll b/llvm/test/CodeGen/X86/2007-05-07-InvokeSRet.ll
index 22e2750..deb3999 100644
--- a/llvm/test/CodeGen/X86/2007-05-07-InvokeSRet.ll
+++ b/llvm/test/CodeGen/X86/2007-05-07-InvokeSRet.ll
@@ -11,5 +11,9 @@
 			to label %return unwind label %return
 
 return:		; preds = %entry, %entry
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret void
 }
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/2008-04-17-CoalescerBug.ll b/llvm/test/CodeGen/X86/2008-04-17-CoalescerBug.ll
index 77720aa..859041e 100644
--- a/llvm/test/CodeGen/X86/2008-04-17-CoalescerBug.ll
+++ b/llvm/test/CodeGen/X86/2008-04-17-CoalescerBug.ll
@@ -151,8 +151,12 @@
 bb7834:		; preds = %bb7806, %invcont5831
 	br label %bb3261
 lpad:		; preds = %bb7806, %bb5968, %invcont5814, %bb440.i8663, %bb155.i8541, %bb5657, %bb3306
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret void
 lpad8185:		; preds = %invcont5831
+        %exn8185 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret void
 }
 
@@ -169,3 +173,5 @@
 declare %struct.wxStringBase* @_ZN12wxStringBaseaSEPKw(%struct.wxStringBase*, i32*)
 
 declare void @_ZN8wxString6FormatEPKwz(%struct.wxString* noalias sret , i32*, ...)
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll b/llvm/test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll
index 94c95d4..0d11546 100644
--- a/llvm/test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll
+++ b/llvm/test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll
@@ -23,8 +23,12 @@
 	unreachable
 
 lpad243:		; preds = %bb37
-	%eh_ptr244 = call i8* @llvm.eh.exception( )		; <i8*> [#uses=1]
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
+	%eh_ptr244 = extractvalue { i8*, i32 } %exn, 0
 	store i32 (...)** getelementptr ([5 x i32 (...)*]* @_ZTVN10Evaluation10GridOutputILi3EEE, i32 0, i32 2), i32 (...)*** null, align 8
 	%tmp133 = call i8* @__cxa_begin_catch( i8* %eh_ptr244 ) nounwind 		; <i8*> [#uses=0]
 	unreachable
 }
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/2009-03-13-PHIElimBug.ll b/llvm/test/CodeGen/X86/2009-03-13-PHIElimBug.ll
index 45fc269..e14c30a 100644
--- a/llvm/test/CodeGen/X86/2009-03-13-PHIElimBug.ll
+++ b/llvm/test/CodeGen/X86/2009-03-13-PHIElimBug.ll
@@ -24,9 +24,13 @@
 
 lpad:		; preds = %cont, %entry
 	%y = phi i32 [ %a, %entry ], [ %aa, %cont ]		; <i32> [#uses=1]
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret i32 %y
 }
 
 ; CHECK: call{{.*}}f
 ; CHECK: movl %eax, %esi
 ; CHECK: call{{.*}}g
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll b/llvm/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
index b13d33e..f8c7a15 100644
--- a/llvm/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
+++ b/llvm/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
@@ -17,8 +17,12 @@
 
 lpad:		; preds = %cont, %entry
 	%v = phi i32 [ %x, %entry ], [ %a, %cont ]		; <i32> [#uses=1]
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret i32 %v
 }
 
 ; CHECK: lpad
 ; CHECK-NEXT: Ltmp
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll b/llvm/test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll
index 7b5e871..5483b73 100644
--- a/llvm/test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll
+++ b/llvm/test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll
@@ -34,6 +34,8 @@
   ret i32 0
 
 lpad:                                             ; preds = %invcont1, %invcont, %entry
+  %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+            cleanup
   %8 = call i32 @vm_deallocate(i32 undef, i64 0, i64 %0) ; <i32> [#uses=0]
   unreachable
 }
@@ -45,3 +47,5 @@
 declare zeroext i8 @invoke(i8*, i32, i8*, i64, i32, i64*, i32*)
 
 declare void @booleanAndDataReply(i32, i32, i32, i32, i64, i32)
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/2009-11-25-ImpDefBug.ll b/llvm/test/CodeGen/X86/2009-11-25-ImpDefBug.ll
index 7606c0e..396638f 100644
--- a/llvm/test/CodeGen/X86/2009-11-25-ImpDefBug.ll
+++ b/llvm/test/CodeGen/X86/2009-11-25-ImpDefBug.ll
@@ -46,6 +46,8 @@
 
 lpad:                                             ; preds = %bb1.i.fragment.cl, %bb1.i.fragment, %bb5
   %.SV10.phi807 = phi i8* [ undef, %bb1.i.fragment.cl ], [ undef, %bb1.i.fragment ], [ undef, %bb5 ] ; <i8*> [#uses=1]
+  %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+            cleanup
   %1 = load i8* %.SV10.phi807, align 8            ; <i8> [#uses=0]
   br i1 undef, label %meshBB81.bbcl.disp, label %bb13.fragment.bbcl.disp
 
@@ -114,3 +116,5 @@
     i8 51, label %meshBB81.cl141
   ]
 }
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll b/llvm/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll
index ef1798d..864ebf1 100644
--- a/llvm/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll
+++ b/llvm/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll
@@ -60,5 +60,9 @@
   unreachable
 
 lpad159:                                          ; preds = %bb58
+  %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+            cleanup
   unreachable
 }
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/asm-label2.ll b/llvm/test/CodeGen/X86/asm-label2.ll
index 0b5de34..8715aa9 100644
--- a/llvm/test/CodeGen/X86/asm-label2.ll
+++ b/llvm/test/CodeGen/X86/asm-label2.ll
@@ -16,7 +16,11 @@
   ret void
 
 lpad:                                             ; preds = %entry
+  %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+            cleanup
   unreachable
 }
 
 declare void @_zed() ssp align 2
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/fast-isel-cmp-branch.ll b/llvm/test/CodeGen/X86/fast-isel-cmp-branch.ll
index 12312e8..6e408f8 100644
--- a/llvm/test/CodeGen/X86/fast-isel-cmp-branch.ll
+++ b/llvm/test/CodeGen/X86/fast-isel-cmp-branch.ll
@@ -26,5 +26,9 @@
 return:
   ret void
 unw:
+  %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+            cleanup
   unreachable
 }
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/fast-isel-gep.ll b/llvm/test/CodeGen/X86/fast-isel-gep.ll
index 05196a8..91d1f5d 100644
--- a/llvm/test/CodeGen/X86/fast-isel-gep.ll
+++ b/llvm/test/CodeGen/X86/fast-isel-gep.ll
@@ -104,6 +104,8 @@
   unreachable
 
 lpad:                                             ; preds = %if.end19, %if.then14, %if.end, %entry
+  %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+            cleanup
   unreachable
 }
 declare i8* @_ZNK18G__FastAllocString4dataEv() nounwind
@@ -134,3 +136,4 @@
   ret i32 4
 }
 
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/personality.ll b/llvm/test/CodeGen/X86/personality.ll
index d3d8e3f..635648d 100644
--- a/llvm/test/CodeGen/X86/personality.ll
+++ b/llvm/test/CodeGen/X86/personality.ll
@@ -8,6 +8,8 @@
           to label %return unwind label %unwind
 
 unwind:                                           ; preds = %entry
+  %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+            cleanup
   br i1 false, label %eh_then, label %cleanup20
 
 eh_then:                                          ; preds = %unwind
@@ -15,7 +17,9 @@
           to label %return unwind label %unwind10
 
 unwind10:                                         ; preds = %eh_then
-  %upgraded.eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* null, i8* bitcast (void ()* @__gxx_personality_v0 to i8*), i32 1)
+  %exn10 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+            filter
+  %upgraded.eh_select13 = extractvalue { i8*, i32 } %exn10, 1
   %upgraded.eh_select131 = sext i32 %upgraded.eh_select13 to i64
   %tmp18 = icmp slt i64 %upgraded.eh_select131, 0
   br i1 %tmp18, label %filter, label %cleanup20
@@ -39,6 +43,8 @@
 
 declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
 
+declare i32 @__gxx_personality_v0(...)
+
 ; X64:      zPLR
 ; X64:      .byte 155
 ; X64-NEXT: .long	___gxx_personality_v0@GOTPCREL+4
diff --git a/llvm/test/CodeGen/X86/pr3522.ll b/llvm/test/CodeGen/X86/pr3522.ll
index da16237..1122530 100644
--- a/llvm/test/CodeGen/X86/pr3522.ll
+++ b/llvm/test/CodeGen/X86/pr3522.ll
@@ -21,6 +21,8 @@
 	ret void
 
 lpad:		; preds = %entry
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	%2 = icmp eq i8 %1, 90		; <i1> [#uses=1]
 	br i1 %2, label %return, label %bb22
 }
@@ -28,3 +30,5 @@
 declare void @__gnat_rcheck_12(i8*, i32) noreturn
 
 declare i32 @report__ident_int(i32)
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/scev-interchange.ll b/llvm/test/CodeGen/X86/scev-interchange.ll
index 81c919f..71a4d21 100644
--- a/llvm/test/CodeGen/X86/scev-interchange.ll
+++ b/llvm/test/CodeGen/X86/scev-interchange.ll
@@ -149,6 +149,8 @@
 			to label %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i.i unwind label %lpad.i.i.i.i.i.i		; <i8*> [#uses=0]
 
 lpad.i.i.i.i.i.i:		; preds = %bb71.i
+        %exn.i.i.i.i.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 _ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i.i:		; preds = %bb71.i
@@ -162,6 +164,8 @@
 			to label %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i12.i.i unwind label %lpad.i.i.i.i8.i.i		; <i8*> [#uses=0]
 
 lpad.i.i.i.i8.i.i:		; preds = %_ZNSt6vectorIjSaIjEED1Ev.exit.i.i
+        %exn.i.i.i.i8.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	invoke void @_Unwind_Resume(i8* undef)
 			to label %.noexc.i9.i.i unwind label %lpad.i19.i.i
 
@@ -179,6 +183,8 @@
 			to label %bb83.i unwind label %lpad188.i
 
 lpad.i19.i.i:		; preds = %lpad.i.i.i.i8.i.i
+        %exn.i19.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 bb83.i:		; preds = %bb50.i.i.i
@@ -192,6 +198,8 @@
 			to label %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i unwind label %lpad.i.i.i.i315.i		; <i8*> [#uses=0]
 
 lpad.i.i.i.i315.i:		; preds = %invcont84.i
+        %exn.i.i.i.i315.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	invoke void @_Unwind_Resume(i8* undef)
 			to label %.noexc.i316.i unwind label %lpad.i352.i
 
@@ -209,6 +217,8 @@
 			to label %invcont86.i unwind label %lpad200.i
 
 lpad.i352.i:		; preds = %lpad.i.i.i.i315.i
+        %exn.i352.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 invcont86.i:		; preds = %bb50.i.i
@@ -232,6 +242,8 @@
 			to label %_ZN10FullMatrixIdEC1Ejj.exit.i.i unwind label %lpad.i.i.i.i.i
 
 lpad.i.i.i.i.i:		; preds = %invcont101.i
+        %exn.i.i.i.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 _ZN10FullMatrixIdEC1Ejj.exit.i.i:		; preds = %invcont101.i
@@ -239,6 +251,8 @@
 			to label %_ZN10FullMatrixIdEC1Ejj.exit28.i.i unwind label %lpad.i.i.i27.i.i
 
 lpad.i.i.i27.i.i:		; preds = %_ZN10FullMatrixIdEC1Ejj.exit.i.i
+        %exn.i.i.i27.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	invoke void @_Unwind_Resume(i8* undef)
 			to label %.noexc.i.i unwind label %lpad.i.i
 
@@ -258,6 +272,8 @@
 	unreachable
 
 lpad.i.i:		; preds = %lpad.i.i.i27.i.i
+        %exn.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 bb.i191.i:		; preds = %.noexc232.i, %bb58.i.i
@@ -296,43 +312,71 @@
 	br label %bb9.i216.i
 
 lpad.i:		; preds = %entry
+        %exn.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad120.i:		; preds = %invcont.i
+        %exn120.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad124.i:		; preds = %invcont1.i
+        %exn124.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad128.i:		; preds = %invcont3.i
+        %exn128.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad132.i:		; preds = %invcont4.i
+        %exn132.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad136.i:		; preds = %invcont6.i
+        %exn136.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad140.i:		; preds = %bb21.i, %invcont7.i
+        %exn140.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad144.i:		; preds = %bb10.i168.i, %invcont9.i
+        %exn144.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad148.i:		; preds = %invcont10.i
+        %exn148.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad188.i:		; preds = %bb50.i.i.i
+        %exn188.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad196.i:		; preds = %bb.i191.i
+        %exn196 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad200.i:		; preds = %bb50.i.i
+        %exn200.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 
 lpad204.i:		; preds = %invcont86.i
+        %exn204.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 }
 
 declare fastcc void @_ZN11Polynomials19LagrangeEquidistant23generate_complete_basisEj(%"struct.std::vector<Polynomials::Polynomial<double>,std::allocator<Polynomials::Polynomial<double> > >"* noalias nocapture sret, i32)
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/CodeGen/X86/split-eh-lpad-edges.ll b/llvm/test/CodeGen/X86/split-eh-lpad-edges.ll
index fd40a7f..756a3dd 100644
--- a/llvm/test/CodeGen/X86/split-eh-lpad-edges.ll
+++ b/llvm/test/CodeGen/X86/split-eh-lpad-edges.ll
@@ -28,7 +28,11 @@
 
 lpad:		; preds = %invcont26, %invcont, %entry
 	%pool.1 = phi %struct.NSAutoreleasePool* [ null, %entry ], [ null, %invcont ], [ null, %invcont26 ]		; <%struct.NSAutoreleasePool*> [#uses=0]
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	unreachable
 }
 
 declare %struct.NSObject* @objc_msgSend(%struct.NSObject*, %struct.objc_selector*, ...)
+
+declare i32 @__gxx_personality_v0(...)