From: Bill Wendling Date: Thu, 1 Sep 2011 00:58:03 +0000 (+0000) Subject: Update some tests to the new EH scheme. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=aeaa9a8b2570ef23e06f2170f08caafda9fcf311;p=oota-llvm.git Update some tests to the new EH scheme. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138925 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll b/test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll index 161821f3f8f..fc25daca1c2 100644 --- a/test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll +++ b/test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll @@ -11,6 +11,8 @@ T: %y = extractvalue {i32,i32} %x, 1 ret i32 %y T2: + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup unreachable } @@ -22,5 +24,9 @@ T: %y = extractvalue {i32,i32} %x, 1 ret i32 %y T2: + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup unreachable } + +declare i32 @__gxx_personality_v0(...) diff --git a/test/Transforms/FunctionAttrs/2008-12-31-NoCapture.ll b/test/Transforms/FunctionAttrs/2008-12-31-NoCapture.ll index 53857f61ce5..e2bab19e7ef 100644 --- a/test/Transforms/FunctionAttrs/2008-12-31-NoCapture.ll +++ b/test/Transforms/FunctionAttrs/2008-12-31-NoCapture.ll @@ -46,9 +46,13 @@ define i1 @c6(i8* %q, i8 %bit) { ret0: ret i1 0 ret1: + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup ret i1 1 } +declare i32 @__gxx_personality_v0(...) + define i1* @lookup_bit(i32* %q, i32 %bitno) readnone nounwind { %tmp = ptrtoint i32* %q to i32 %tmp2 = lshr i32 %tmp, %bitno diff --git a/test/Transforms/GVN/2010-05-08-OneBit.ll b/test/Transforms/GVN/2010-05-08-OneBit.ll index 1809cf03f90..480ce8ba0ae 100644 --- a/test/Transforms/GVN/2010-05-08-OneBit.ll +++ b/test/Transforms/GVN/2010-05-08-OneBit.ll @@ -45,6 +45,8 @@ k151.i.i: ; preds = %k133.i.i ret i32 0 landing_pad: ; preds = %l147.i.i, %l129.i.i, %l117.i.i + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup switch i32 undef, label %fin [ i32 1, label %catch1 i32 2, label %catch @@ -61,3 +63,5 @@ catch1: ; preds = %landing_pad } declare fastcc void @foo() + +declare i32 @__gxx_personality_v0(...) diff --git a/test/Transforms/IPConstantProp/return-argument.ll b/test/Transforms/IPConstantProp/return-argument.ll index 6d6eb24cf54..f4b7018222e 100644 --- a/test/Transforms/IPConstantProp/return-argument.ll +++ b/test/Transforms/IPConstantProp/return-argument.ll @@ -36,14 +36,22 @@ define void @caller(i1 %C) { ;; propagated per-caller). %S1 = call { i32, i32 } @foo(i32 1, i32 2) %X1 = extractvalue { i32, i32 } %S1, 0 - %S2 = invoke { i32, i32 } @foo(i32 3, i32 4) to label %OK unwind label %RET + %S2 = invoke { i32, i32 } @foo(i32 3, i32 4) to label %OK unwind label %LPAD + OK: %X2 = extractvalue { i32, i32 } %S2, 0 ;; Do some stuff with the returned values which we can grep for %Z = add i32 %X1, %X2 store i32 %Z, i32* %W br label %RET + +LPAD: + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup + br label %RET + RET: ret void } +declare i32 @__gxx_personality_v0(...) diff --git a/test/Transforms/IPConstantProp/return-constant.ll b/test/Transforms/IPConstantProp/return-constant.ll index b2558595287..ff15df73881 100644 --- a/test/Transforms/IPConstantProp/return-constant.ll +++ b/test/Transforms/IPConstantProp/return-constant.ll @@ -22,5 +22,9 @@ OK: %Y = icmp ne i32 %X, 0 ; [#uses=1] ret i1 %Y FAIL: + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup ret i1 false } + +declare i32 @__gxx_personality_v0(...)