aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-reduce/remove-unused-declarations.ll
blob: cbf2e34c1baf71076bb0974c4bdf08ed3fad9526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; 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
; RUN: FileCheck --check-prefix=CHECK-ALL --implicit-check-not=uninteresting %s < %t

declare void @llvm.uninteresting()
declare void @uninteresting()

; CHECK-ALL: declare void @llvm.interesting()
; CHECK-ALL: declare void @interesting()
declare void @llvm.interesting()
declare void @interesting()

; CHECK-ALL: define void @main() {
; CHECK-ALL-NEXT:  call void @llvm.interesting()
; CHECK-ALL-NEXT:   call void @interesting()
; CHECK-ALL-NEXT:   ret void
; CHECK-ALL-NEXT: }
define void @main() {
  call void @llvm.interesting()
  call void @interesting()
  ret void
}