1 ; RUN: llc < %s | FileCheck %s
3 target datalayout = "e-p:16:16:16-i8:8:8-i16:16:16-i32:16:32-n8:16"
4 target triple = "msp430---elf"
6 ; Function Attrs: nounwind
7 define i16 @test(i16 %i) #0 {
11 ; CHECK: mov r12, 0(r1)
12 ; CHECK-NEXT: cmp #4, r12
13 ; CHECK-NEXT: jhs .LBB0_3
14 %retval = alloca i16, align 2
15 %i.addr = alloca i16, align 2
16 store i16 %i, i16* %i.addr, align 2
17 %0 = load i16, i16* %i.addr, align 2
19 ; CHECK-NEXT: br .LJTI0_0(r12)
20 switch i16 %0, label %sw.default [
27 sw.bb: ; preds = %entry
28 store i16 0, i16* %retval
31 sw.bb1: ; preds = %entry
32 store i16 1, i16* %retval
35 sw.bb2: ; preds = %entry
36 store i16 2, i16* %retval
39 sw.bb3: ; preds = %entry
40 store i16 3, i16* %retval
43 sw.default: ; preds = %entry
44 store i16 2, i16* %retval
47 return: ; preds = %sw.default, %sw.bb3, %sw.bb2, %sw.bb1, %sw.bb
48 %1 = load i16, i16* %retval
54 ; CHECK-NEXT: .short .LBB0_2
55 ; CHECK-NEXT: .short .LBB0_4
56 ; CHECK-NEXT: .short .LBB0_3
57 ; CHECK-NEXT: .short .LBB0_5