1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/Reduce/remove-unused-declarations.ll
Roman Lebedev 36db6ab153 [llvm-reduce] Fix removal of unused llvm intrinsics declarations
ee6e25e4391a6d3ac0a3c89615474e512f44cda6 changed
the delta pass to skip intrinsics, which means we may end up being
left with declarations of intrinsics, that aren't otherwise referenced
in the module. This is obviously unwanted, do drop them.
2021-01-03 01:45:47 +03:00

22 lines
734 B
LLVM

; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: cat %t | FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL --implicit-check-not=uninteresting %s
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
}