aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SCCP
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/SCCP')
-rw-r--r--test/Transforms/SCCP/switch.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/SCCP/switch.ll b/test/Transforms/SCCP/switch.ll
new file mode 100644
index 0000000..9f93423
--- /dev/null
+++ b/test/Transforms/SCCP/switch.ll
@@ -0,0 +1,13 @@
+; RUN: opt -S -sccp < %s | FileCheck %s
+
+; Make sure we always consider the default edge executable for a switch
+; with no cases.
+declare void @foo()
+define void @test1() {
+; CHECK: define void @test1
+; CHECK: call void @foo()
+ switch i32 undef, label %d []
+d:
+ call void @foo()
+ ret void
+}