42 lines · plain
1; RUN: llvm-reduce %s -o %t --abort-on-invalid-reduction --delta-passes=arguments --test FileCheck --test-arg %s --test-arg --check-prefix=INTERESTING --test-arg --input-file2; RUN: FileCheck %s --input-file %t --check-prefix=REDUCED3 4; Test that we don't break the callsite for an unhandled invoke5 6declare void @did_not_throw(i32)7declare void @thrown()8 9; INTERESTING-LABEL: define i32 @maybe_throwing_callee(10 11; REDUCED-LABEL: define i32 @maybe_throwing_callee(i32 %arg0, i32 %arg1) {12define i32 @maybe_throwing_callee(i32 %arg0, i32 %arg1) {13 call void @thrown()14 ret i32 %arg115}16 17@initializer_user = global [1 x ptr] [ptr @maybe_throwing_callee ]18 19; REDUCED-LABEL: define void @caller()20; REDUCED: %i0 = invoke i32 @maybe_throwing_callee(i32 0, i32 0) #021define void @caller(i32 %arg0, ptr %arg1) personality ptr @__gxx_personality_v0 {22bb:23 %val = load i32, ptr %arg124 %i0 = invoke i32 @maybe_throwing_callee(i32 0, i32 0) nofree25 to label %bb3 unwind label %bb126 27bb1:28 landingpad { ptr, i32 }29 catch ptr null30 call void @thrown()31 br label %bb432 33bb3:34 call void @did_not_throw(i32 %i0)35 br label %bb436 37bb4:38 ret void39}40 41declare i32 @__gxx_personality_v0(...)42