1 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=instructions --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
2 ; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s < %t
4 ; CHECK-INTERESTINGNESS: define i32 @maybe_throwing_callee(
5 ; CHECK-FINAL: define i32 @maybe_throwing_callee(i32 %arg)
6 define i32 @maybe_throwing_callee(i32 %arg) {
7 ; CHECK-ALL: call void @thrown()
8 ; CHECK-INTERESTINGNESS: ret i32
9 ; CHECK-FINAL: ret i32 %arg
14 ; CHECK-ALL: declare void @did_not_throw(i32)
15 declare void @did_not_throw(i32)
17 ; CHECK-ALL: declare void @thrown()
18 declare void @thrown()
20 ; CHECK-INTERESTINGNESS: define void @caller(
21 ; CHECK-FINAL: define void @caller(i32 %arg)
22 define void @caller(i32 %arg) personality ptr @__gxx_personality_v0 {
25 ; CHECK-INTERESTINGNESS: %i0 = invoke i32 {{.*}}@maybe_throwing_callee
26 ; CHECK-FINAL: %i0 = invoke i32 @maybe_throwing_callee
27 ; CHECK-ALL: to label %bb3 unwind label %bb1
28 %i0 = invoke i32 @maybe_throwing_callee(i32 %arg)
29 to label %bb3 unwind label %bb1
33 ; CHECK-ALL: landingpad { ptr, i32 }
34 ; CHECK-ALL: catch ptr null
35 ; CHECK-ALL: call void @thrown()
36 ; CHECK-ALL: br label %bb4
37 landingpad { ptr, i32 }
44 ; CHECK-ALL: call void @did_not_throw(i32 %i0)
45 ; CHECK-ALL: br label %bb4
46 call void @did_not_throw(i32 %i0)
55 declare i32 @__gxx_personality_v0(...)