1; BB cluster sections error handling 2; RUN: echo '!f' > %t1 3; RUN: echo '!!1 4' >> %t1 4; RUN: echo '!!1' >> %t1 5; RUN: not --crash llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t1 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1 6; CHECK-ERROR1: LLVM ERROR: Invalid profile {{.*}} at line 3: Duplicate basic block id found '1'. 7; RUN: echo '!f' > %t2 8; RUN: echo '!!4 0' >> %t2 9; RUN: not --crash llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t2 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR2 10; CHECK-ERROR2: LLVM ERROR: Invalid profile {{.*}} at line 2: Entry BB (0) does not begin a cluster. 11; RUN: echo '!f' > %t3 12; RUN: echo '!!-1' >> %t3 13; RUN: not --crash llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t3 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR3 14; CHECK-ERROR3: LLVM ERROR: Invalid profile {{.*}} at line 2: Unsigned integer expected: '-1'. 15; RUN: echo '!!1' > %t4 16; RUN: echo '!f' >> %t4 17; RUN: not --crash llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t4 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR4 18; CHECK-ERROR4: LLVM ERROR: Invalid profile {{.*}} at line 1: Cluster list does not follow a function name specifier. 19 20define i32 @dummy(i32 %x, i32 %y, i32 %z) { 21 entry: 22 %tmp = mul i32 %x, %y 23 %tmp2 = add i32 %tmp, %z 24 ret i32 %tmp2 25} 26