summaryrefslogtreecommitdiffstats
path: root/test/Transforms/LowerSwitch
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
commite6d5d39c072d3b16ff4183c515d7ccf198192958 (patch)
tree57312300a30d0b10726d10d7928aa6f657e9ad28 /test/Transforms/LowerSwitch
parentce7d5db4d86b6eef20ffb9e981a1f0d428879e57 (diff)
downloadexternal_llvm-e6d5d39c072d3b16ff4183c515d7ccf198192958.zip
external_llvm-e6d5d39c072d3b16ff4183c515d7ccf198192958.tar.gz
external_llvm-e6d5d39c072d3b16ff4183c515d7ccf198192958.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/LowerSwitch')
-rw-r--r--test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll28
-rw-r--r--test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll10
-rw-r--r--test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll20
3 files changed, 28 insertions, 30 deletions
diff --git a/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll b/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll
index 0ff1f5c..cb5f090 100644
--- a/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll
+++ b/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll
@@ -1,17 +1,15 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -lowerswitch
-
-void %child(int %ct.1) {
-entry: ; No predecessors!
- switch uint 0, label %return [
- uint 3, label %UnifiedExitNode
- uint 0, label %return
- ]
-
-return: ; preds = %entry, %entry
- %result.0 = phi int* [ null, %entry ], [ null, %entry ] ; <%struct.quad_struct*> [#uses=0]
- br label %UnifiedExitNode
-
-UnifiedExitNode: ; preds = %entry, %return, %entry, %entry
- ret void
+; RUN: llvm-as < %s | opt -lowerswitch
+
+define void @child(i32 %ct.1) {
+entry:
+ switch i32 0, label %return [
+ i32 3, label %UnifiedExitNode
+ i32 0, label %return
+ ]
+return: ; preds = %entry, %entry
+ %result.0 = phi i32* [ null, %entry ], [ null, %entry ] ; <i32*> [#uses=0]
+ br label %UnifiedExitNode
+UnifiedExitNode: ; preds = %return, %entry
+ ret void
}
diff --git a/test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll b/test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll
index a193cd4..71e5a4b 100644
--- a/test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll
+++ b/test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll
@@ -1,7 +1,9 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -lowerswitch
+; RUN: llvm-as < %s | opt -lowerswitch
-void %test() {
- switch uint 0, label %Next []
-Next:
+define void @test() {
+ switch i32 0, label %Next [
+ ]
+Next: ; preds = %0
ret void
}
+
diff --git a/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll b/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
index 1cbe853..2fc1c98 100644
--- a/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
+++ b/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
@@ -1,21 +1,19 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -lowerswitch -disable-output
+; RUN: llvm-as < %s | opt -lowerswitch -disable-output
-void %solve() {
+define void @solve() {
entry:
- %targetBlock = call ushort %solve_code( ) ; <ushort> [#uses=1]
+ %targetBlock = call i16 @solve_code( ) ; <i16> [#uses=1]
br label %codeReplTail
-
then.1: ; preds = %codeReplTail
ret void
-
loopexit.0: ; preds = %codeReplTail
ret void
-
-codeReplTail: ; preds = %entry, %codeReplTail
- switch ushort %targetBlock, label %codeReplTail [
- ushort 0, label %loopexit.0
- ushort 1, label %then.1
+codeReplTail: ; preds = %codeReplTail, %entry
+ switch i16 %targetBlock, label %codeReplTail [
+ i16 0, label %loopexit.0
+ i16 1, label %then.1
]
}
-declare ushort %solve_code()
+declare i16 @solve_code()
+