1 ; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
2 ; RUN: cat %t | FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s
4 ; CHECK-INTERESTINGNESS: define i32 @maybe_throwing_callee(
5 ; CHECK-FINAL: define i32 @maybe_throwing_callee()
6 define i32 @maybe_throwing_callee(i32 %arg) {
7 ; CHECK-ALL: call void @thrown()
8 ; CHECK-INTERESTINGNESS: ret i32
9 ; CHECK-FINAL: ret i32 undef
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 i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
25 ; CHECK-INTERESTINGNESS: %i0 = invoke i32
26 ; CHECK-FINAL: %i0 = invoke i32 bitcast (i32 ()* @maybe_throwing_callee to i32 (i32)*)(i32 %arg)
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 { i8*, i32 }
34 ; CHECK-ALL: catch i8* null
35 ; CHECK-ALL: call void @thrown()
36 ; CHECK-ALL: br label %bb4
37 landingpad { i8*, 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(...)