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 correctly
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 %t
5 ; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s --input-file %t
7 %struct.foo = type { ptr, i32, i32, ptr }
9 define dso_local void @bar() {
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)
17 ; CHECK-ALL: define internal void @interesting
18 ; CHECK-INTERESTINGNESS-SAME: ({{.*}}%interesting{{.*}}) {
19 ; CHECK-FINAL-SAME: (ptr %interesting) {
20 define internal void @interesting(i32 %uninteresting1, ptr %uninteresting2, ptr %interesting, ptr %uninteresting3, i64 %uninteresting4) {