brintos

brintos / llvm-project-archived public Read only

0
0
Text · 884 B · 3a744cc Raw
32 lines · plain
1; Test that llvm-reduce can remove uninteresting functions as well as2; their InstCalls.3;4; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=functions,instructions --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t5; RUN: cat %t | FileCheck -implicit-check-not=uninteresting --check-prefixes=CHECK-ALL,CHECK-FINAL %s6 7define i32 @uninteresting1() {8entry:9  ret i32 010}11 12; CHECK-ALL-LABEL: interesting()13define i32 @interesting() {14entry:15  ; CHECK-INTERESTINGNESS: call i32 @interesting()16  %call2 = call i32 @interesting()17  %call = call i32 @uninteresting1()18  ret i32 519}20 21; CHECK-FINAL-NEXT: entry:22; CHECK-FINAL-NEXT:   %call2 = call i32 @interesting()23; CHECK-FINAL-NEXT:   ret i32 524; CHECK-FINAL-NEXT: }25 26define i32 @uninteresting2() {27entry:28  ret i32 029}30 31declare void @uninteresting3()32