1 ; RUN: llvm-as < %s | llvm-dis > %t1.ll 2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll 3 ; RUN: diff %t1.ll %t2.ll 4 5 %int = type i32 6 7 define i32 @squared(i32 %i0) { 8 switch i32 %i0, label %Default [ 9 i32 1, label %Case1 10 i32 2, label %Case2 11 i32 4, label %Case4 12 ] 13 14 Default: ; preds = %0 15 ret i32 -1 16 17 Case1: ; preds = %0 18 ret i32 1 19 20 Case2: ; preds = %0 21 ret i32 4 22 23 Case4: ; preds = %0 24 ret i32 16 25 } 26 27 28 @Addr = global i8* blockaddress(@indbrtest, %BB1) 29 @Addr3 = global i8* blockaddress(@squared, %Case1) 30 31 32 define i32 @indbrtest(i8* %P, i32* %Q) { 33 indirectbr i8* %P, [label %BB1, label %BB2, label %BB3] 34 BB1: 35 indirectbr i32* %Q, [] 36 BB2: 37 %R = bitcast i8* blockaddress(@indbrtest, %BB3) to i8* 38 indirectbr i8* %R, [label %BB1, label %BB2, label %BB3] 39 BB3: 40 ret i32 2 41 } 42 43 44