1 ; RUN: llvm-as < %s -disable-output 2>&1 | FileCheck %s -allow-empty 2 ; CHECK-NOT: error 3 ; CHECK-NOT: warning 4 ; RUN: verify-uselistorder < %s 5 6 @ba1 = constant i8* blockaddress (@bafunc1, %bb) 7 @ba2 = constant i8* getelementptr (i8, i8* blockaddress (@bafunc2, %bb), i61 0) 8 @ba3 = constant i8* getelementptr (i8, i8* blockaddress (@bafunc2, %bb), i61 0) 9 10 define i8* @babefore() { 11 ret i8* getelementptr (i8, i8* blockaddress (@bafunc2, %bb), i61 0) 12 bb1: 13 ret i8* blockaddress (@bafunc1, %bb) 14 bb2: 15 ret i8* blockaddress (@bafunc3, %bb) 16 } 17 define void @bafunc1() { 18 br label %bb 19 bb: 20 unreachable 21 } 22 define void @bafunc2() { 23 br label %bb 24 bb: 25 unreachable 26 } 27 define void @bafunc3() { 28 br label %bb 29 bb: 30 unreachable 31 } 32 define i8* @baafter() { 33 ret i8* blockaddress (@bafunc2, %bb) 34 bb1: 35 ret i8* blockaddress (@bafunc1, %bb) 36 bb2: 37 ret i8* blockaddress (@bafunc3, %bb) 38 } 39 40 uselistorder_bb @bafunc1, %bb, { 1, 0 } 41 uselistorder_bb @bafunc2, %bb, { 1, 0 } 42 uselistorder_bb @bafunc3, %bb, { 1, 0 } 43