1 ; Test that llvm-reduce can remove uninteresting function arguments from function definitions as well as their calls.
3 ; RUN: llvm-reduce --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
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
13 declare void @use(ptr, ptr, ptr)
15 ; CHECK-LABEL: @interesting()
16 define void @interesting() {
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)