Skip to content

Commit

Permalink
llvm-reduce: Use -abort-on-invalid-reduction in a test
Browse files Browse the repository at this point in the history
Also stop using cat
  • Loading branch information
arsenm committed Oct 7, 2022
1 parent 3a25b21 commit 023f24d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-reduce/remove-bbs-entry.ll
@@ -1,7 +1,7 @@
; Test that llvm-reduce does not remove the entry block of functions.
;
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: cat %t | FileCheck %s
; RUN: FileCheck %s < %t

; CHECK-INTERESTINGNESS: foo

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-reduce/remove-bbs-ret-nonvoid.ll
@@ -1,8 +1,8 @@
; Test that llvm-reduce inserts valid return instructions for functions with
; on-void return types.
;
; RUN: llvm-reduce --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: cat %t | FileCheck %s
; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: FileCheck %s < %t

; CHECK-INTERESTINGNESS: interesting:
; CHECK-INTERESTINGNESS: interesting2:
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-reduce/remove-bbs-sequence.ll
@@ -1,5 +1,5 @@
; RUN: llvm-reduce --delta-passes=basic-blocks --test %python --test-arg %p/remove-bbs-sequence.py %s -o %t
; RUN: cat %t | FileCheck %s
; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=basic-blocks --test %python --test-arg %p/remove-bbs-sequence.py %s -o %t
; RUN: FileCheck %s < %t

; The interestingness test is that the CFG contains a loop. Verify that the
; unnecessary bb2 and bb3 are removed while still maintaining a loop.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-reduce/remove-bbs-unreachable.ll
Expand Up @@ -2,7 +2,7 @@
; unreachable blocks.
;
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: cat %t | FileCheck %s
; RUN: FileCheck %s < %t

; CHECK-INTERESTINGNESS: test

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-reduce/remove-bbs.ll
@@ -1,8 +1,8 @@
; Test that llvm-reduce can remove uninteresting Basic Blocks, and remove them from instructions (i.e. SwitchInst, BranchInst and IndirectBrInst)
; Note: if an uninteresting BB is the default case for a switch, the instruction is removed altogether (since the default case cannot be replaced)
;
; RUN: llvm-reduce --delta-passes=basic-blocks --test %python --test-arg %p/Inputs/remove-bbs.py %s -o %t
; RUN: cat %t | FileCheck -implicit-check-not=uninteresting %s
; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=basic-blocks --test %python --test-arg %p/Inputs/remove-bbs.py %s -o %t
; RUN: FileCheck -implicit-check-not=uninteresting %s < %t

define void @main() {
interesting:
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-reduce/remove-call-site-attributes.ll
@@ -1,6 +1,6 @@
; Test that llvm-reduce can remove uninteresting operand bundles from calls.
;
; RUN: llvm-reduce --delta-passes=operand-bundles,attributes --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=operand-bundles,attributes --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 %s

; CHECK-ALL: declare i32 @f1(i32, i32)
Expand Down

0 comments on commit 023f24d

Please sign in to comment.