[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / tools / llvm-reduce / remove-bbs-unreachable.ll
blobf1ecd66b9f7ca1ce8987a91c9efd12bc3707cdf9
1 ; Check that verification doesn't fail when reducing a function with
2 ; unreachable blocks.
4 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=unreachable-basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
5 ; RUN: FileCheck -check-prefix=UNREACHABLE %s < %t
7 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
8 ; RUN: FileCheck -check-prefix=REACHABLE %s < %t
10 ; CHECK-INTERESTINGNESS: test0
11 ; CHECK-INTERESTINGNESS: test1
13 ; UNREACHABLE: define void @test0() {
14 ; UNREACHABLE-NEXT: entry:
15 ; UNREACHABLE-NEXT:   br label %exit
17 ; UNREACHABLE-NOT: unreachable
18 ; UNREACHABLE: exit:
19 ; UNREACHABLE-NEXT: ret void
22 ; basic-blocks cannot deal with unreachable blocks, leave it behind
23 ; REACHABLE: define void @test0() {
24 ; REACHABLE: entry:
25 ; REACHABLE: unreachable:
26 ; REACHABLE: exit:
28 define void @test0() {
29 entry:
30   br label %exit
32 unreachable:                                        ; No predecessors!
33   br label %exit
35 exit:
36   ret void
39 ; UNREACHABLE: define void @test1() {
40 ; UNREACHABLE-NEXT: entry:
41 ; UNREACHABLE-NEXT:   br label %exit
43 ; REACHABLE: define void @test1() {
44 ; REACHABLE: entry:
45 ; REACHABLE: unreachable:
46 ; REACHABLE: exit:
47 define void @test1() {
48 entry:
49   br label %exit
51 unreachable:
52   br label %unreachable
54 exit:
55   ret void