1 ; RUN: llvm-dis < %s.bc| FileCheck %s 2 3 ; case-ranges.ll.bc was generated by passing this file to llvm-as from the 3.3 4 ; release of LLVM. This tests that the bitcode for switches from that release 5 ; can still be read. 6 7 define i32 @foo(i32 %x) nounwind ssp uwtable { 8 ; CHECK: define i32 @foo 9 %1 = alloca i32, align 4 10 %2 = alloca i32, align 4 11 store i32 %x, i32* %2, align 4 12 %3 = load i32* %2, align 4 13 switch i32 %3, label %9 [ 14 ; CHECK: switch i32 %3, label %9 15 i32 -3, label %4 16 ; CHECK-NEXT: i32 -3, label %4 17 i32 -2, label %4 18 ; CHECK-NEXT: i32 -2, label %4 19 i32 -1, label %4 20 ; CHECK-NEXT: i32 -1, label %4 21 i32 0, label %4 22 ; CHECK-NEXT: i32 0, label %4 23 i32 1, label %4 24 ; CHECK-NEXT: i32 1, label %4 25 i32 2, label %4 26 ; CHECK-NEXT: i32 2, label %4 27 i32 4, label %5 28 ; CHECK-NEXT: i32 4, label %5 29 i32 5, label %6 30 ; CHECK-NEXT: i32 5, label %6 31 i32 6, label %7 32 ; CHECK-NEXT: i32 6, label %7 33 i32 7, label %8 34 ; CHECK-NEXT: i32 7, label %8 35 ] 36 37 ; <label>:4 38 store i32 -1, i32* %1 39 br label %11 40 41 ; <label>:5 42 store i32 2, i32* %1 43 br label %11 44 45 ; <label>:6 46 store i32 1, i32* %1 47 br label %11 48 49 ; <label>:7 50 store i32 4, i32* %1 51 br label %11 52 53 ; <label>:8 54 store i32 3, i32* %1 55 br label %11 56 57 ; <label>:9 58 br label %10 59 60 ; <label>:10 61 store i32 0, i32* %1 62 br label %11 63 64 ; <label>:11 65 %12 = load i32* %1 66 ret i32 %12 67 } 68