1; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=global-variables --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 3 4; Check a case where llvm.used is fully deleted 5; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=global-variables --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 7 8; CHECK-INTERESTINGNESS: @kept_used = global 9; CHECK-FINAL: @kept_used = global 10@kept_used = global i32 0 11 12@removed_used = global i32 1 13 14; CHECK-INTERESTINGNESS: @kept_compiler_used = global 15; CHECK-FINAL: @kept_compiler_used = global 16@kept_compiler_used = global i32 2 17 18@removed_compiler_used = global i32 3 19 20; CHECK-OTHER: @foo = global 21; CHECK-REMOVED: @foo = global 22@foo = global i32 4 23 24@llvm.used = appending global [2 x ptr] [ptr @kept_used, ptr @removed_used ] 25@llvm.compiler.used = appending global [2 x ptr] [ptr @kept_compiler_used, ptr @removed_compiler_used ] 26 27 28; CHECK-REMOVED-NOT: @llvm.used 29; CHECK-REMOVED-NOT: @llvm.compiler.used 30 31; CHECK-FINAL: @llvm.used = appending global [1 x ptr] [ptr @kept_used] 32; CHECK-FINAL: @llvm.compiler.used = appending global [1 x ptr] [ptr @kept_compiler_used] 33