[ARM] Fixup the creation of VPT blocks
[llvm-core.git] / test / CodeGen / Thumb2 / 2010-04-26-CopyRegCrash.ll
blob3be016fbd1dd9592735f1cb04cf753f1945d520d
1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin
2 ; Radar 7896289
4 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"
5 target triple = "thumbv7-apple-darwin10"
7 define void @test(i32 %mode) nounwind optsize noinline {
8 entry:
9   br i1 undef, label %return, label %bb3
11 bb3:                                              ; preds = %entry
12   br i1 undef, label %bb15, label %bb18
14 bb15:                                             ; preds = %bb3
15   unreachable
17 bb18:                                             ; preds = %bb3
18   switch i32 %mode, label %return [
19     i32 0, label %bb26
20     i32 1, label %bb56
21     i32 2, label %bb107
22     i32 6, label %bb150.preheader
23     i32 9, label %bb310.preheader
24     i32 13, label %bb414.preheader
25     i32 15, label %bb468.preheader
26     i32 16, label %bb522.preheader
27   ]
29 bb150.preheader:                                  ; preds = %bb18
30   br i1 undef, label %bb154, label %bb160
32 bb310.preheader:                                  ; preds = %bb18
33   unreachable
35 bb414.preheader:                                  ; preds = %bb18
36   unreachable
38 bb468.preheader:                                  ; preds = %bb18
39   unreachable
41 bb522.preheader:                                  ; preds = %bb18
42   unreachable
44 bb26:                                             ; preds = %bb18
45   unreachable
47 bb56:                                             ; preds = %bb18
48   unreachable
50 bb107:                                            ; preds = %bb18
51   br label %bb110
53 bb110:                                            ; preds = %bb122, %bb107
54   %asmtmp.i.i179 = tail call i16 asm "rev16 $0, $1\0A", "=l,l"(i16 undef) nounwind ; <i16> [#uses=1]
55   %asmtmp.i.i178 = tail call i16 asm "rev16 $0, $1\0A", "=l,l"(i16 %asmtmp.i.i179) nounwind ; <i16> [#uses=1]
56   store i16 %asmtmp.i.i178, i16* undef, align 2
57   br i1 undef, label %bb122, label %bb121
59 bb121:                                            ; preds = %bb110
60   br label %bb122
62 bb122:                                            ; preds = %bb121, %bb110
63   br label %bb110
65 bb154:                                            ; preds = %bb150.preheader
66   unreachable
68 bb160:                                            ; preds = %bb150.preheader
69   unreachable
71 return:                                           ; preds = %bb18, %entry
72   ret void