brintos

brintos / llvm-project-archived public Read only

0
0
Text · 931 B · 4361dc0 Raw
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 --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 7declare void @pass(ptr)8 9define void @bar() {10entry:11  ; CHECK-INTERESTINGNESS: call void @pass({{.*}}@interesting12  ; CHECK-FINAL: call void @pass(ptr @interesting)13  call void @pass(ptr @interesting)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) {21entry:22  ret void23}24