]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/CodeGen/ARM/jumptable-label.ll
Updates to sync with changes in upstream.
[opencl/llvm.git] / test / CodeGen / ARM / jumptable-label.ll
1 ; RUN: llc < %s -mtriple thumbv6-apple-macosx10.6.0 | FileCheck %s
3 ; test that we print the label of a bb that is only used in a jump table.
5 ; CHECK:        .long   LBB0_2
6 ; CHECK: LBB0_2:
8 define i32 @calculate()  {
9 entry:
10   switch i32 undef, label %return [
11     i32 1, label %sw.bb
12     i32 2, label %sw.bb6
13     i32 3, label %sw.bb13
14     i32 4, label %sw.bb20
15   ]
17 sw.bb:                                            ; preds = %entry
18   br label %return
20 sw.bb6:                                           ; preds = %entry
21   br label %return
23 sw.bb13:                                          ; preds = %entry
24   br label %return
26 sw.bb20:                                          ; preds = %entry
27   %div = sdiv i32 undef, undef
28   br label %return
30 return:                                           ; preds = %sw.bb20, %sw.bb13, %sw.bb6, %sw.bb, %entry
31   %retval.0 = phi i32 [ %div, %sw.bb20 ], [ undef, %sw.bb13 ], [ undef, %sw.bb6 ], [ undef, %sw.bb ], [ 0, %entry ]
32   ret i32 %retval.0
33 }