1 ; Check that verification doesn't fail when reducing a function with
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
19 ; UNREACHABLE-NEXT: ret void
22 ; basic-blocks cannot deal with unreachable blocks, leave it behind
23 ; REACHABLE: define void @test0() {
25 ; REACHABLE: unreachable:
28 define void @test0() {
32 unreachable: ; No predecessors!
39 ; UNREACHABLE: define void @test1() {
40 ; UNREACHABLE-NEXT: entry:
41 ; UNREACHABLE-NEXT: br label %exit
43 ; REACHABLE: define void @test1() {
45 ; REACHABLE: unreachable:
47 define void @test1() {