1 ; RUN: llvm-dis < %s.bc| FileCheck %s 2 3 ; TerminatorOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2. 4 ; The test checks that LLVM does not misread terminator instructions from 5 ; older bitcode files. 6 7 define i32 @condbr(i1 %cond){ 8 entry: 9 ; CHECK: br i1 %cond, label %TrueLabel, label %FalseLabel 10 br i1 %cond, label %TrueLabel, label %FalseLabel 11 12 TrueLabel: 13 ret i32 1 14 15 FalseLabel: 16 ret i32 0 17 } 18 19 define i32 @uncondbr(){ 20 entry: 21 ; CHECK: br label %uncondLabel 22 br label %uncondLabel 23 24 uncondLabel: 25 ret i32 1 26 } 27 28 define i32 @indirectbr(i8* %Addr){ 29 entry: 30 ; CHECK: indirectbr i8* %Addr, [label %bb1, label %bb2] 31 indirectbr i8* %Addr, [ label %bb1, label %bb2 ] 32 33 bb1: 34 ret i32 1 35 36 bb2: 37 ret i32 0 38 } 39 40 define void @unreachable(){ 41 entry: 42 ; CHECK: unreachable 43 unreachable 44 45 ret void 46 } 47 48