1 ; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS0 --test-arg %s --test-arg --input-file %s -o %t.0
2 ; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL0 %s < %t.0
4 ; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS1 --test-arg %s --test-arg --input-file %s -o %t.1
5 ; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL1 %s < %t.1
7 declare i32 @maybe_throwing_callee()
9 ; CHECK-ALL: declare void @did_not_throw(i32)
10 declare void @did_not_throw(i32)
12 declare void @thrown()
14 ; CHECK-ALL: define void @caller()
15 define void @caller() personality ptr @__gxx_personality_v0 {
17 ; CHECK-FINAL1-NEXT: br label %bb1
19 ; CHECK-INTERESTINGNESS0: label %bb3
20 ; CHECK-FINAL0: br label %bb3
21 %i0 = invoke i32 @maybe_throwing_callee()
22 to label %bb3 unwind label %bb1
25 landingpad { ptr, i32 } catch ptr null
26 ; CHECK-INTERESTINGNESS1: call void @thrown()
29 ; CHECK-FINAL1-NEXT: call void @thrown()
30 ; CHECK-FINAL1-NEXT: ret void
34 ; CHECK-INTERESTINGNESS0: bb3:
37 ; CHECK-INTERESTINGNESS0: call void @did_not_throw(i32
38 ; CHECK-INTERESTINGNESS0: br label %bb4
40 ; CHECK-FINAL0: call void @did_not_throw(i32 0)
41 ; CHECK-FINAL0: br label %bb4
43 call void @did_not_throw(i32 %i0)
47 ; RESULT0-NEXT: ret void
49 ; CHECK-INTERESTINGNESS0: bb4:
50 ; CHECK-INTERESTINGNESS0-NEXT: ret void
56 declare i32 @__gxx_personality_v0(...)