1 ; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=functions --test FileCheck --test-arg --check-prefix=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t.0
2 ; RUN: FileCheck --implicit-check-not=define --check-prefix=CHECK-FINAL %s < %t.0
4 ; Check a case where llvm.used is fully deleted
5 ; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=functions --test FileCheck --test-arg --check-prefixes=CHECK-OTHER --test-arg %s --test-arg --input-file %s -o %t.1
6 ; RUN: FileCheck --implicit-check-not=define --check-prefix=CHECK-REMOVED %s < %t.1
8 @llvm.used = appending global [2 x ptr] [ptr @kept_used, ptr @removed_used ]
9 @llvm.compiler.used = appending global [2 x ptr] [ptr @kept_compiler_used, ptr @removed_compiler_used ]
12 ; CHECK-REMOVED-NOT: @llvm.used
13 ; CHECK-REMOVED-NOT: @llvm.compiler.used
15 ; CHECK-FINAL: @llvm.used = appending global [1 x ptr] [ptr @kept_used]
16 ; CHECK-FINAL: @llvm.compiler.used = appending global [1 x ptr] [ptr @kept_compiler_used]
19 ; CHECK-INTERESTINGNESS: define void @kept_used(
20 ; CHECK-FINAL: define void @kept_used(
21 define void @kept_used() {
25 define void @removed_used() {
29 ; CHECK-INTERESTINGNESS: define void @kept_compiler_used(
30 ; CHECK-FINAL: define void @kept_compiler_used(
31 define void @kept_compiler_used() {
35 define void @removed_compiler_used() {
39 ; CHECK-OTHER: define void @foo(
40 ; CHECK-REMOVED: define void @foo(