1; RUN: opt < %s -lowerswitch -disable-output
2
3; This test verify -lowerswitch does not crash after deleting the default block.
4
5declare i32 @f(i32)
6
7define i32 @unreachable(i32 %x) {
8
9entry:
10  switch i32 %x, label %unreachable [
11    i32 5, label %a
12    i32 6, label %a
13    i32 7, label %a
14    i32 10, label %b
15    i32 20, label %b
16    i32 30, label %b
17    i32 40, label %b
18  ]
19unreachable:
20  unreachable
21a:
22  %0 = call i32 @f(i32 0)
23  ret i32 %0
24b:
25  %1 = call i32 @f(i32 1)
26  ret i32 %1
27}
28