[llvm-commits] [llvm] r140076 - in /llvm/trunk/test/Transforms: Inline/2004-04-15-InlineDeletesCall.ll Inline/2004-10-17-InlineFunctionWithoutReturn.ll Inline/2006-11-09-InlineCGUpdate-2.ll Inline/2006-11-09-InlineCGUpdate.ll SimplifyCFG/invoke_unwind.ll

Bill Wendling isanbard at gmail.com
Mon Sep 19 15:11:35 PDT 2011


Author: void
Date: Mon Sep 19 17:11:35 2011
New Revision: 140076

URL: http://llvm.org/viewvc/llvm-project?rev=140076&view=rev
Log:
Replace more uses of 'unwind' in the tests with calls to landingpad and
resume. Note that some of these tests were basically dead.

Modified:
    llvm/trunk/test/Transforms/Inline/2004-04-15-InlineDeletesCall.ll
    llvm/trunk/test/Transforms/Inline/2004-10-17-InlineFunctionWithoutReturn.ll
    llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll
    llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll
    llvm/trunk/test/Transforms/SimplifyCFG/invoke_unwind.ll

Modified: llvm/trunk/test/Transforms/Inline/2004-04-15-InlineDeletesCall.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/2004-04-15-InlineDeletesCall.ll?rev=140076&r1=140075&r2=140076&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/2004-04-15-InlineDeletesCall.ll (original)
+++ llvm/trunk/test/Transforms/Inline/2004-04-15-InlineDeletesCall.ll Mon Sep 19 17:11:35 2011
@@ -5,7 +5,7 @@
 ; exists.
 
 define internal void @Callee1() {
-        unwind
+        unreachable
 }
 
 define void @Callee2() {

Modified: llvm/trunk/test/Transforms/Inline/2004-10-17-InlineFunctionWithoutReturn.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/2004-10-17-InlineFunctionWithoutReturn.ll?rev=140076&r1=140075&r2=140076&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/2004-10-17-InlineFunctionWithoutReturn.ll (original)
+++ llvm/trunk/test/Transforms/Inline/2004-10-17-InlineFunctionWithoutReturn.ll Mon Sep 19 17:11:35 2011
@@ -1,7 +1,7 @@
 ; RUN: opt < %s -inline -disable-output
 
 define i32 @test() {
-        unwind
+        unreachable
 }
 
 define i32 @caller() {

Modified: llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll?rev=140076&r1=140075&r2=140076&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll (original)
+++ llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll Mon Sep 19 17:11:35 2011
@@ -114,7 +114,7 @@
 define fastcc void @_ZSt19__throw_ios_failurePKc() {
 entry:
 	call fastcc void @_ZNSsC1EPKcRKSaIcE( )
-	unwind
+	unreachable
 }
 
 define void @_GLOBAL__D__ZSt23lexicographical_compareIPKaS1_EbT_S2_T0_S3_() {
@@ -133,10 +133,12 @@
 			to label %try_exit.0 unwind label %try_catch.0
 
 try_catch.0:		; preds = %entry
-	unreachable
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 catch i8* null
+	resume { i8*, i32 } %exn
 
 try_exit.0:		; preds = %entry
-	unwind
+	unreachable
 }
 
 define fastcc void @_ZNSt11logic_errorC1ERKSs() {
@@ -153,7 +155,7 @@
 define fastcc void @_ZSt20__throw_length_errorPKc() {
 entry:
 	call fastcc void @_ZNSt12length_errorC1ERKSs( )
-	unwind
+	unreachable
 }
 
 define fastcc void @_ZNSt12length_errorC1ERKSs() {
@@ -162,7 +164,9 @@
 			to label %_ZNSt11logic_errorC2ERKSs.exit unwind label %invoke_catch.i
 
 invoke_catch.i:		; preds = %entry
-	unwind
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 catch i8* null
+	resume { i8*, i32 } %exn
 
 _ZNSt11logic_errorC2ERKSs.exit:		; preds = %entry
 	ret void
@@ -199,8 +203,10 @@
 			to label %invoke_cont.1 unwind label %invoke_catch.1
 
 invoke_catch.1:		; preds = %entry
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 catch i8* null
 	call fastcc void @_ZNSaIcED1Ev( )
-	unwind
+	resume { i8*, i32 } %exn
 
 invoke_cont.1:		; preds = %entry
 	call fastcc void @_ZNSaIcEC2ERKS_( )
@@ -243,3 +249,5 @@
 entry:
 	unreachable
 }
+
+declare i32 @__gxx_personality_v0(...)

Modified: llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll?rev=140076&r1=140075&r2=140076&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll (original)
+++ llvm/trunk/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll Mon Sep 19 17:11:35 2011
@@ -155,7 +155,7 @@
 define fastcc void @_ZSt20__throw_length_errorPKc() {
 entry:
 	call fastcc void @_ZNSt12length_errorC1ERKSs( )
-	unwind
+	ret void
 }
 
 define fastcc void @_ZNSs16_S_construct_auxIPKcEEPcT_S3_RKSaIcE12__false_type() {
@@ -178,8 +178,10 @@
 			to label %invoke_cont.1 unwind label %invoke_catch.1
 
 invoke_catch.1:		; preds = %entry
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 catch i8* null
 	call fastcc void @_ZNSaIcED1Ev( )
-	unwind
+	resume { i8*, i32 } %exn
 
 invoke_cont.1:		; preds = %entry
 	call fastcc void @_ZNSaIcEC2ERKS_( )
@@ -306,7 +308,9 @@
 			to label %_ZNSt11logic_errorC2ERKSs.exit unwind label %invoke_catch.i
 
 invoke_catch.i:		; preds = %entry
-	unwind
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 catch i8* null
+	resume { i8*, i32 } %exn
 
 _ZNSt11logic_errorC2ERKSs.exit:		; preds = %entry
 	ret void
@@ -336,3 +340,5 @@
 entry:
 	ret void
 }
+
+declare i32 @__gxx_personality_v0(...)

Modified: llvm/trunk/test/Transforms/SimplifyCFG/invoke_unwind.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/invoke_unwind.ll?rev=140076&r1=140075&r2=140076&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/invoke_unwind.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/invoke_unwind.ll Mon Sep 19 17:11:35 2011
@@ -12,21 +12,9 @@
                         to label %1 unwind label %Rethrow
         ret i32 0
 Rethrow:
-        unwind
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 catch i8* null
+        resume { i8*, i32 } %exn
 }
 
-
-; Verify that simplifycfg isn't duplicating 'unwind' instructions.  Doing this
-; is bad because it discourages commoning.
-define i32 @test2(i1 %c) {
-; CHECK: @test2
-; CHECK: T:
-; CHECK-NEXT: call void @bar()
-; CHECK-NEXT: br label %F
-  br i1 %c, label %T, label %F
-T:
-  call void @bar()
-  br label %F
-F:
-  unwind
-}
+declare i32 @__gxx_personality_v0(...)





More information about the llvm-commits mailing list