[llvm] 023f24d - llvm-reduce: Use -abort-on-invalid-reduction in a test
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 7 13:15:27 PDT 2022
Author: Matt Arsenault
Date: 2022-10-07T13:15:14-07:00
New Revision: 023f24d8931267074aa5a60078dddc744187fcfc
URL: https://github.com/llvm/llvm-project/commit/023f24d8931267074aa5a60078dddc744187fcfc
DIFF: https://github.com/llvm/llvm-project/commit/023f24d8931267074aa5a60078dddc744187fcfc.diff
LOG: llvm-reduce: Use -abort-on-invalid-reduction in a test
Also stop using cat
Added:
Modified:
llvm/test/tools/llvm-reduce/remove-bbs-entry.ll
llvm/test/tools/llvm-reduce/remove-bbs-ret-nonvoid.ll
llvm/test/tools/llvm-reduce/remove-bbs-sequence.ll
llvm/test/tools/llvm-reduce/remove-bbs-unreachable.ll
llvm/test/tools/llvm-reduce/remove-bbs.ll
llvm/test/tools/llvm-reduce/remove-call-site-attributes.ll
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-reduce/remove-bbs-entry.ll b/llvm/test/tools/llvm-reduce/remove-bbs-entry.ll
index 03a461d74cb6..2bcb49ef9c1f 100644
--- a/llvm/test/tools/llvm-reduce/remove-bbs-entry.ll
+++ b/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
diff --git a/llvm/test/tools/llvm-reduce/remove-bbs-ret-nonvoid.ll b/llvm/test/tools/llvm-reduce/remove-bbs-ret-nonvoid.ll
index e094902695b9..187b1230c2d7 100644
--- a/llvm/test/tools/llvm-reduce/remove-bbs-ret-nonvoid.ll
+++ b/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:
diff --git a/llvm/test/tools/llvm-reduce/remove-bbs-sequence.ll b/llvm/test/tools/llvm-reduce/remove-bbs-sequence.ll
index 0b2fdb5bd8bd..6ea830d14646 100644
--- a/llvm/test/tools/llvm-reduce/remove-bbs-sequence.ll
+++ b/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.
diff --git a/llvm/test/tools/llvm-reduce/remove-bbs-unreachable.ll b/llvm/test/tools/llvm-reduce/remove-bbs-unreachable.ll
index 385cf80c1115..4b9555e4a00e 100644
--- a/llvm/test/tools/llvm-reduce/remove-bbs-unreachable.ll
+++ b/llvm/test/tools/llvm-reduce/remove-bbs-unreachable.ll
@@ -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
diff --git a/llvm/test/tools/llvm-reduce/remove-bbs.ll b/llvm/test/tools/llvm-reduce/remove-bbs.ll
index 714ef498da85..fa912503a7d0 100644
--- a/llvm/test/tools/llvm-reduce/remove-bbs.ll
+++ b/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:
diff --git a/llvm/test/tools/llvm-reduce/remove-call-site-attributes.ll b/llvm/test/tools/llvm-reduce/remove-call-site-attributes.ll
index 09a8fbd95548..cf15b0b3133f 100644
--- a/llvm/test/tools/llvm-reduce/remove-call-site-attributes.ll
+++ b/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)
More information about the llvm-commits
mailing list