aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/LowerInvoke
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-03-19 07:28:33 +0000
committerTanya Lattner <tonic@nondot.org>2008-03-19 07:28:33 +0000
commit9792837e758478bbdc7e1df3d1f1d304eee59011 (patch)
tree57312300a30d0b10726d10d7928aa6f657e9ad28 /test/Transforms/LowerInvoke
parent97b38e11f380ad6308f706d30c0a4fb2d042a0a0 (diff)
downloadexternal_llvm-9792837e758478bbdc7e1df3d1f1d304eee59011.zip
external_llvm-9792837e758478bbdc7e1df3d1f1d304eee59011.tar.gz
external_llvm-9792837e758478bbdc7e1df3d1f1d304eee59011.tar.bz2
Upgrade tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LowerInvoke')
-rw-r--r--test/Transforms/LowerInvoke/2003-12-10-Crash.llx26
-rw-r--r--test/Transforms/LowerInvoke/2004-02-29-PHICrash.llx17
-rw-r--r--test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHI.ll19
-rw-r--r--test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHIUse.ll19
-rw-r--r--test/Transforms/LowerInvoke/basictest.ll45
5 files changed, 61 insertions, 65 deletions
diff --git a/test/Transforms/LowerInvoke/2003-12-10-Crash.llx b/test/Transforms/LowerInvoke/2003-12-10-Crash.llx
index 495099a..1e8b880 100644
--- a/test/Transforms/LowerInvoke/2003-12-10-Crash.llx
+++ b/test/Transforms/LowerInvoke/2003-12-10-Crash.llx
@@ -1,24 +1,22 @@
; This testcase was reduced from Shootout-C++/reversefile.cpp by bugpoint
-; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -disable-output
+; RUN: llvm-as < %s | opt -lowerinvoke -disable-output
-declare void %baz()
+declare void @baz()
-declare void %bar()
-
-void %foo() {
-then: ; preds = %entry
- invoke void %baz( )
- to label %invoke_cont.0 except label %try_catch
+declare void @bar()
+define void @foo() {
+then:
+ invoke void @baz( )
+ to label %invoke_cont.0 unwind label %try_catch
invoke_cont.0: ; preds = %then
- invoke void %bar( )
- to label %try_exit except label %try_catch
-
-try_catch: ; preds = %then, %invoke_cont.0
- %__tmp.0 = phi int* [ null, %invoke_cont.0 ], [ null, %then ]
+ invoke void @bar( )
+ to label %try_exit unwind label %try_catch
+try_catch: ; preds = %invoke_cont.0, %then
+ %__tmp.0 = phi i32* [ null, %invoke_cont.0 ], [ null, %then ] ; <i32*> [#uses=0]
ret void
-
try_exit: ; preds = %invoke_cont.0
ret void
}
+
diff --git a/test/Transforms/LowerInvoke/2004-02-29-PHICrash.llx b/test/Transforms/LowerInvoke/2004-02-29-PHICrash.llx
index 9018257..0777013 100644
--- a/test/Transforms/LowerInvoke/2004-02-29-PHICrash.llx
+++ b/test/Transforms/LowerInvoke/2004-02-29-PHICrash.llx
@@ -1,16 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -enable-correct-eh-support -disable-output
+; RUN: llvm-as < %s | opt -lowerinvoke -enable-correct-eh-support -disable-output
-void %_ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale() {
+define void @_ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale() {
entry:
- br bool false, label %then, label %UnifiedReturnBlock
-
+ br i1 false, label %then, label %UnifiedReturnBlock
then: ; preds = %entry
- invoke void %_Znwj( )
+ invoke void @_Znwj( )
to label %UnifiedReturnBlock unwind label %UnifiedReturnBlock
-
-UnifiedReturnBlock: ; preds = %entry, %then, %then
- %UnifiedRetVal = phi int* [ null, %entry ], [ null, %then ], [ null, %then ]
+UnifiedReturnBlock: ; preds = %then, %then, %entry
+ %UnifiedRetVal = phi i32* [ null, %entry ], [ null, %then ], [ null, %then ] ; <i32*> [#uses=0]
ret void
}
-declare void %_Znwj()
+declare void @_Znwj()
+
diff --git a/test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHI.ll b/test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHI.ll
index 51f3fb2..10c8785 100644
--- a/test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHI.ll
+++ b/test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHI.ll
@@ -1,20 +1,17 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -enable-correct-eh-support -disable-output
+; RUN: llvm-as < %s | opt -lowerinvoke -enable-correct-eh-support -disable-output
-implementation ; Functions:
+declare void @ll_listnext__listiterPtr()
-declare void %ll_listnext__listiterPtr()
-
-void %WorkTask.fn() {
+define void @WorkTask.fn() {
block0:
- invoke void %ll_listnext__listiterPtr( )
+ invoke void @ll_listnext__listiterPtr( )
to label %block9 unwind label %block8_exception_handling
-
block8_exception_handling: ; preds = %block0
ret void
-
block9: ; preds = %block0
- %w_2690 = phi { int, int }* [ null, %block0 ] ; <{ int, int }*> [#uses=1]
- %tmp.129 = getelementptr { int, int }* %w_2690, int 0, uint 1 ; <int*> [#uses=1]
- %v2769 = load int* %tmp.129 ; <int> [#uses=0]
+ %w_2690 = phi { i32, i32 }* [ null, %block0 ] ; <{ i32, i32 }*> [#uses=1]
+ %tmp.129 = getelementptr { i32, i32 }* %w_2690, i32 0, i32 1 ; <i32*> [#uses=1]
+ %v2769 = load i32* %tmp.129 ; <i32> [#uses=0]
ret void
}
+
diff --git a/test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHIUse.ll b/test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHIUse.ll
index 6366257..0a8ccbe 100644
--- a/test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHIUse.ll
+++ b/test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHIUse.ll
@@ -1,16 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -enable-correct-eh-support -disable-output
+; RUN: llvm-as < %s | opt -lowerinvoke -enable-correct-eh-support -disable-output
-declare fastcc int %ll_listnext__listiterPtr()
+declare fastcc i32 @ll_listnext__listiterPtr()
-fastcc int %WorkTask.fn() {
+define fastcc i32 @WorkTask.fn() {
block0:
- %v2679 = invoke fastcc int %ll_listnext__listiterPtr( )
- to label %block9 unwind label %block8_exception_handling ; <int> [#uses=1]
-
+ %v2679 = invoke fastcc i32 @ll_listnext__listiterPtr( )
+ to label %block9 unwind label %block8_exception_handling ; <i32> [#uses=1]
block8_exception_handling: ; preds = %block0
- ret int 0
-
+ ret i32 0
block9: ; preds = %block0
- %i_2689 = phi int [ %v2679, %block0 ] ; <int> [#uses=0]
- ret int %i_2689
+ %i_2689 = phi i32 [ %v2679, %block0 ] ; <i32> [#uses=1]
+ ret i32 %i_2689
}
+
diff --git a/test/Transforms/LowerInvoke/basictest.ll b/test/Transforms/LowerInvoke/basictest.ll
index 8c38b89..a9c19f2 100644
--- a/test/Transforms/LowerInvoke/basictest.ll
+++ b/test/Transforms/LowerInvoke/basictest.ll
@@ -1,27 +1,30 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -lowerinvoke -disable-output -enable-correct-eh-support
+; RUN: llvm-as < %s | opt -lowerinvoke -disable-output -enable-correct-eh-support
-implementation
-int %foo() {
- invoke int %foo() to label %Ok unwind label %Crap
-Ok:
- invoke int %foo() to label %Ok2 unwind label %Crap
-Ok2:
- ret int 2
-Crap:
- ret int 1
+define i32 @foo() {
+ invoke i32 @foo( )
+ to label %Ok unwind label %Crap ; <i32>:1 [#uses=0]
+Ok: ; preds = %0
+ invoke i32 @foo( )
+ to label %Ok2 unwind label %Crap ; <i32>:2 [#uses=0]
+Ok2: ; preds = %Ok
+ ret i32 2
+Crap: ; preds = %Ok, %0
+ ret i32 1
}
-int %bar(int %blah) {
+define i32 @bar(i32 %blah) {
br label %doit
-doit:
- ;; Value live across an unwind edge.
- %B2 = add int %blah, 1
- invoke int %foo() to label %Ok unwind label %Crap
-Ok:
- invoke int %foo() to label %Ok2 unwind label %Crap
-Ok2:
- ret int 2
-Crap:
- ret int %B2
+doit: ; preds = %0
+ ;; Value live across an unwind edge.
+ %B2 = add i32 %blah, 1 ; <i32> [#uses=1]
+ invoke i32 @foo( )
+ to label %Ok unwind label %Crap ; <i32>:1 [#uses=0]
+Ok: ; preds = %doit
+ invoke i32 @foo( )
+ to label %Ok2 unwind label %Crap ; <i32>:2 [#uses=0]
+Ok2: ; preds = %Ok
+ ret i32 2
+Crap: ; preds = %Ok, %doit
+ ret i32 %B2
}