1 ; RUN: not llvm-extract -S -bb foo:invalidbb %s 2>&1 | FileCheck %s
3 ; CHECK: function foo doesn't contain a basic block named 'invalidbb'!
4 define i32 @foo(i32 %arg) {
6 %tmp = alloca i32, align 4
7 %tmp1 = alloca i32, align 4
8 store i32 %arg, i32* %tmp1, align 4
9 %tmp2 = load i32, i32* %tmp1, align 4
10 %tmp3 = icmp sgt i32 %tmp2, 0
11 br i1 %tmp3, label %bb4, label %bb7
14 %tmp5 = load i32, i32* %tmp1, align 4
15 %tmp6 = add nsw i32 %tmp5, 1
16 store i32 %tmp6, i32* %tmp1, align 4
17 store i32 %tmp6, i32* %tmp, align 4
21 store i32 0, i32* %tmp, align 4
24 bb8: ; preds = %bb7, %bb4
25 %tmp9 = load i32, i32* %tmp, align 4