brintos

brintos / llvm-project-archived public Read only

0
0
Text · 738 B · e13cd29 Raw
21 lines · plain
1; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=special-globals --test FileCheck --test-arg --check-prefix=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t.02; RUN: FileCheck --implicit-check-not=define --check-prefix=CHECK-FINAL %s < %t.03 4; Check that we don't hit "input module no longer interesting after5; counting chunks" The special-globals reduction was not checking6; shouldKeep before unconditionally erasing it.7 8; CHECK-INTERESTINGNESS: llvm.used9; CHECK-FINAL: llvm.used10; CHECK-FINAL: define void @kept_used11; CHECK-FINAL: define void @other12@llvm.used = appending global [2 x ptr] [ptr @kept_used, ptr @other ]13 14define void @kept_used() {15  ret void16}17 18define void @other() {19  ret void20}21