1 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=function-data --test FileCheck --test-arg --check-prefixes=CHECK,INTERESTING --test-arg %s --test-arg --input-file %s -o %t
2 ; RUN: FileCheck -check-prefixes=CHECK,RESULT %s < %t
4 ; INTERESTING: define void @drop_personality(
5 ; RESULT: define void @drop_personality() {
6 define void @drop_personality() personality ptr @__gxx_personality_v0 {
10 ; CHECK: define void @keep_personality() personality ptr @__gxx_personality_v0 {
11 define void @keep_personality() personality ptr @__gxx_personality_v0 {
15 ; Make sure an invalid reduction isn't produced if we need a
16 ; personality function for different instructions
18 ; CHECK: define void @landingpad_requires_personality()
19 ; RESULT-SAME: personality ptr @__gxx_personality_v0 {
20 define void @landingpad_requires_personality() personality ptr @__gxx_personality_v0 {
25 landingpad { ptr, i32 }
33 ; CHECK-LABEL: define void @uses_catchpad()
34 ; RESULT-SAME: personality ptr @__CxxFrameHandler3 {
35 define void @uses_catchpad() personality ptr @__CxxFrameHandler3 {
40 %cs = catchswitch within none [label %catch] unwind to caller
43 %cp = catchpad within %cs [ptr null, i32 64, ptr null]
50 ; CHECK-LABEL: define void @uses_resume()
51 ; RESULT-SAME: personality ptr @__gxx_personality_v0
52 define void @uses_resume() personality ptr @__gxx_personality_v0 {
54 resume { ptr, i32 } zeroinitializer
57 declare i32 @__gxx_personality_v0(...)
58 declare i32 @__CxxFrameHandler3(...)