1; Test that llvm-reduce can remove uninteresting function arguments from function definitions as well as their calls.
2;
3; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefix=CHECK-ALL --test-arg %s --test-arg --input-file %s -o %t
4; RUN: FileCheck --check-prefix=CHECK-ALL %s < %t
5
6; CHECK-ALL: @uninteresting1 = global
7; CHECK-ALL: @uninteresting2 = global
8; CHECK-ALL: @uninteresting3 = global
9@uninteresting1 = global i32 0, align 4
10@uninteresting2 = global i32 0, align 4
11@uninteresting3 = global i32 0, align 4
12
13declare void @use(ptr, ptr, ptr)
14
15; CHECK-LABEL: @interesting()
16define void @interesting() {
17entry:
18  ; CHECK-ALL: call void @use(ptr @uninteresting1, ptr @uninteresting2, ptr @uninteresting3)
19  call void @use(ptr @uninteresting1, ptr @uninteresting2, ptr @uninteresting3)
20  call void @use(ptr @uninteresting1, ptr @uninteresting2, ptr @uninteresting3)
21  call void @use(ptr @uninteresting1, ptr @uninteresting2, ptr @uninteresting3)
22  ret void
23}
24