24 lines · plain
1; Test that llvm-reduce can remove uninteresting function arguments from function definitions as well as their calls.2; This test checks that functions with different argument types are handled correctly3;4; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=arguments --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t5; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s --input-file %t6 7%struct.foo = type { ptr, i32, i32, ptr }8 9define dso_local void @bar() {10entry:11 ; CHECK-INTERESTINGNESS: call void @interesting(12 ; CHECK-FINAL: call void @interesting(ptr null)13 call void @interesting(i32 0, ptr null, ptr null, ptr null, i64 0)14 ret void15}16 17; CHECK-ALL: define internal void @interesting18; CHECK-INTERESTINGNESS-SAME: ({{.*}}%interesting{{.*}}) {19; CHECK-FINAL-SAME: (ptr %interesting) {20define internal void @interesting(i32 %uninteresting1, ptr %uninteresting2, ptr %interesting, ptr %uninteresting3, i64 %uninteresting4) {21entry:22 ret void23}24