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