aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-14 04:13:57 +0000
committerChris Lattner <sabre@nondot.org>2004-03-14 04:13:57 +0000
commit6cc83750b8c4eaadabae405240d06d6d70fb8ef8 (patch)
tree9b1a404f8d51d503bcf7dd0c47c43b070984721e /test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
parentbb41156c0ce9cc8d0af35f6eb928a42cfe93a799 (diff)
downloadexternal_llvm-6cc83750b8c4eaadabae405240d06d6d70fb8ef8.zip
external_llvm-6cc83750b8c4eaadabae405240d06d6d70fb8ef8.tar.gz
external_llvm-6cc83750b8c4eaadabae405240d06d6d70fb8ef8.tar.bz2
New testcase that crashes the -lowerswitch pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll')
-rw-r--r--test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll b/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
new file mode 100644
index 0000000..4c412aa
--- /dev/null
+++ b/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
@@ -0,0 +1,21 @@
+; RUN: llvm-as < %s | opt -lowerswitch -disable-output
+
+void %solve() {
+entry:
+ %targetBlock = call ushort %solve_code( ) ; <ushort> [#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
+ ]
+}
+
+declare ushort %solve_code()