1; RUN: llc < %s
2; No FileCheck - testing for crash.
3
4target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
5target triple = "thumbv5e-none-linux-gnueabi"
6
7%struct.blam = type { [4 x %struct.eggs], [6 x [15 x i16]], [6 x i32], i32, i32, i32, i32, i32, i32, %struct.eggs, [4 x %struct.eggs], [4 x %struct.eggs], [4 x i32], i32, i32, i32, [4 x %struct.eggs], [4 x %struct.eggs], i32, %struct.eggs, i32 }
8%struct.eggs = type { i32, i32 }
9
10define void @spam(%struct.blam* %arg, i32 %arg1) {
11bb:
12  %tmp = getelementptr inbounds %struct.blam, %struct.blam* %arg, i32 undef, i32 2, i32 %arg1
13  switch i32 %arg1, label %bb8 [
14    i32 0, label %bb2
15    i32 1, label %bb3
16    i32 2, label %bb4
17    i32 3, label %bb5
18    i32 4, label %bb6
19    i32 5, label %bb7
20  ]
21
22bb2:                                              ; preds = %bb
23  unreachable
24
25bb3:                                              ; preds = %bb
26  unreachable
27
28bb4:                                              ; preds = %bb
29  unreachable
30
31bb5:                                              ; preds = %bb
32  unreachable
33
34bb6:                                              ; preds = %bb
35  unreachable
36
37bb7:                                              ; preds = %bb
38  unreachable
39
40bb8:                                              ; preds = %bb
41  store i32 1, i32* %tmp, align 4
42  unreachable
43}
44