Skip to content

Commit 1437a83

Browse files
authored
Add --abort-on-invalid-reduction to more lit tests (#80263)
1 parent 28865da commit 1437a83

31 files changed

+37
-37
lines changed

llvm/test/tools/llvm-reduce/custom-delta-passes.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
; RUN: llvm-reduce --delta-passes=module-data --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
1+
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=module-data --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
22
; RUN: FileCheck --check-prefix=CHECK-NOCHANGE %s < %t
3-
; RUN: llvm-reduce --delta-passes=function-bodies --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
3+
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=function-bodies --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
44
; RUN: FileCheck --check-prefix=CHECK-CHANGE %s < %t
5-
; RUN: llvm-reduce --delta-passes=function-bodies,module-data --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
5+
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=function-bodies,module-data --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
66
; RUN: FileCheck --check-prefix=CHECK-CHANGE %s < %t
77

8-
; RUN: not llvm-reduce --delta-passes=foo --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
9-
; RUN: not llvm-reduce --delta-passes='function-bodies;module-data' --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
8+
; RUN: not llvm-reduce --abort-on-invalid-reduction --delta-passes=foo --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
9+
; RUN: not llvm-reduce --abort-on-invalid-reduction --delta-passes='function-bodies;module-data' --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2>&1 | FileCheck %s --check-prefix=ERROR
1010

1111
; RUN: llvm-reduce --print-delta-passes --test FileCheck %s 2>&1 | FileCheck %s --check-prefix=PRINT
1212

llvm/test/tools/llvm-reduce/do-not-remove-terminator.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
1+
; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
22
; RUN: cat %t | FileCheck --check-prefixes=CHECK-FINAL %s
33

44
; Make sure we do not remove the terminator of the entry block. The interesting

llvm/test/tools/llvm-reduce/fail-file-open.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not llvm-reduce --test=echo %s.NotAFileInTestingDir 2>&1 | FileCheck %s
1+
# RUN: not llvm-reduce --abort-on-invalid-reduction --test=echo %s.NotAFileInTestingDir 2>&1 | FileCheck %s
22

33
This file will not be read. An invalid file path is fed to llvm-reduce.
44

llvm/test/tools/llvm-reduce/granularity-level.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; Test that llvm-reduce produces the same output when starting at a higher granularity level.
22
;
3-
; RUN: llvm-reduce --delta-passes=functions,instructions --starting-granularity-level=2 --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
3+
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=functions,instructions --starting-granularity-level=2 --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
44
; RUN: cat %t | FileCheck -implicit-check-not=uninteresting --check-prefixes=CHECK-ALL,CHECK-FINAL %s
55

66
define i32 @uninteresting1() {

llvm/test/tools/llvm-reduce/no-replace-intrinsic-callee-with-undef.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
; not replaced. The whole call instruction can be removed by instruction
44
; reduction instead.
55

6-
; RUN: llvm-reduce --delta-passes=functions,instructions --test FileCheck --test-arg --check-prefixes=ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2> %t.log
6+
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=functions,instructions --test FileCheck --test-arg --check-prefixes=ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2> %t.log
77
; RUN: FileCheck -implicit-check-not=uninteresting --check-prefixes=ALL,CHECK-FINAL %s < %t
88

99
; Check that the call is removed by instruction reduction passes
10-
; RUN: llvm-reduce --delta-passes=functions,instructions --test FileCheck --test-arg --check-prefix=ALL --test-arg %s --test-arg --input-file %s -o %t
10+
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=functions,instructions --test FileCheck --test-arg --check-prefix=ALL --test-arg %s --test-arg --input-file %s -o %t
1111
; RUN: FileCheck -implicit-check-not=uninteresting --check-prefixes=ALL,CHECK-NOCALL %s < %t
1212

1313

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
; This reuses llvm/test/tools/llvm-reduce/operands-skip.ll
22
; REQUIRES: thread_support
33

4-
; RUN: llvm-reduce -j 2 %S/operands-skip.ll -o %t.1 --delta-passes=operands-skip --test FileCheck --test-arg %S/operands-skip.ll --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
4+
; RUN: llvm-reduce --abort-on-invalid-reduction -j 2 %S/operands-skip.ll -o %t.1 --delta-passes=operands-skip --test FileCheck --test-arg %S/operands-skip.ll --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
55
; RUN: FileCheck %S/operands-skip.ll --input-file %t.1 --check-prefixes=REDUCED
66

7-
; RUN: llvm-reduce -j 4 %S/operands-skip.ll -o %t.2 --delta-passes=operands-skip --test FileCheck --test-arg %S/operands-skip.ll --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
7+
; RUN: llvm-reduce --abort-on-invalid-reduction -j 4 %S/operands-skip.ll -o %t.2 --delta-passes=operands-skip --test FileCheck --test-arg %S/operands-skip.ll --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
88
; RUN: FileCheck %S/operands-skip.ll --input-file %t.2 --check-prefixes=REDUCED

llvm/test/tools/llvm-reduce/operands-skip.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llvm-reduce %s -o %t --delta-passes=operands-skip --test FileCheck --test-arg %s --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
1+
; RUN: llvm-reduce %s -o %t --abort-on-invalid-reduction --delta-passes=operands-skip --test FileCheck --test-arg %s --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
22
; RUN: FileCheck %s --input-file %t --check-prefixes=REDUCED
33

44
; INTERESTING: store i32 43, ptr {{(%imm|%indirect)}}, align 4

llvm/test/tools/llvm-reduce/operands-to-args.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llvm-reduce %s -o %t --delta-passes=operands-to-args --test FileCheck --test-arg %s --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
1+
; RUN: llvm-reduce %s -o %t --abort-on-invalid-reduction --delta-passes=operands-to-args --test FileCheck --test-arg %s --test-arg --match-full-lines --test-arg --check-prefix=INTERESTING --test-arg --input-file
22
; RUN: FileCheck %s --input-file %t --check-prefixes=REDUCED,INTERESTING
33

44
; REDUCED-LABEL: define void @func(i32 %k, ptr %Local, ptr %Global) {

llvm/test/tools/llvm-reduce/oracle-count.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-LOG
1+
; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-LOG
22
; RUN: FileCheck --check-prefixes=CHECK-FINAL --input-file=%t %s
33

44
; CHECK-INTERESTINGNESS: ret i32

llvm/test/tools/llvm-reduce/parallel-workitem-kill.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; REQUIRES: thread_support
2-
; RUN: llvm-reduce -j 4 %s -o %t --delta-passes=instructions --test %python --test-arg %S/Inputs/sleep-and-check-stores.py --test-arg 1 --test-arg 5
2+
; RUN: llvm-reduce -j 4 %s -o %t --abort-on-invalid-reduction --delta-passes=instructions --test %python --test-arg %S/Inputs/sleep-and-check-stores.py --test-arg 1 --test-arg 5
33
; RUN: FileCheck %s < %t
44

55
; CHECK: define void @foo

0 commit comments

Comments
 (0)