Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-reduce/distinct-dimetadata-nullptr.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; Test checking that distinct metadata reduction pass handles null pointers properly.
; This test will lead to a crash if nullptrs inside distinct metadata are not handled correctly, in this case inside DICompileUnit

; RUN: llvm-reduce --delta-passes=distinct-metadata --aggressive-named-md-reduction --test FileCheck --test-arg %s --test-arg --input-file %s -o %t
; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=distinct-metadata --aggressive-named-md-reduction --test FileCheck --test-arg %s --test-arg --input-file %s -o %t
; CHECK: {{.*}}distinct !DICompileUnit{{.*}}


Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-reduce/operands-to-args-metadata.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: llvm-reduce %s -o %t --delta-passes=operands-to-args --test FileCheck --test-arg %s --test-arg --input-file
; RUN: llvm-reduce -abort-on-invalid-reduction %s -o %t --delta-passes=operands-to-args --test FileCheck --test-arg %s --test-arg --input-file

; CHECK: @foo

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-reduce/reduce-distinct-metadata.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; Test that every boring node is removed and all interesting distinct nodes remain after aggressive distinct metadata reduction.

; RUN: llvm-reduce --aggressive-named-md-reduction --test %python --test-arg %p/Inputs/reduce-distinct-metadata.py %s -o %t
; RUN: llvm-reduce -abort-on-invalid-reduction --aggressive-named-md-reduction --test %python --test-arg %p/Inputs/reduce-distinct-metadata.py %s -o %t
; RUN: FileCheck %s < %t

; CHECK-NOT: {{.*}}boring{{.*}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; We can't actually put attributes on intrinsic declarations, only on call sites.
;
; RUN: llvm-reduce --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
; RUN: llvm-reduce -abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s < %t

define i32 @t(i32 %a) {
; CHECK-ALL-LABEL: @t(
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-reduce/remove-function-bodies.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: llvm-reduce --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
; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s < %t

; CHECK-INTERESTINGNESS: @callee(
; CHECK-FINAL: declare void @callee()
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-reduce/remove-instructions.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; Test that llvm-reduce can remove uninteresting instructions.
;
; RUN: llvm-reduce --test %python --test-arg %p/Inputs/remove-instructions.py %s -o %t
; RUN: llvm-reduce -abort-on-invalid-reduction --test %python --test-arg %p/Inputs/remove-instructions.py %s -o %t
; RUN: cat %t | FileCheck -implicit-check-not=uninteresting %s
; REQUIRES: plugins

Expand Down
6 changes: 3 additions & 3 deletions llvm/test/tools/llvm-reduce/remove-metadata.ll
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
; Test that llvm-reduce can remove uninteresting metadata from an IR file.
; The Metadata pass erases named & unnamed metadata nodes.
;
; RUN: llvm-reduce --aggressive-named-md-reduction --test %python --test-arg %p/Inputs/remove-metadata.py %s -o %t
; RUN: FileCheck --check-prefixes=AGGRESSIVE --implicit-check-not=! %s < %t
; RUN: llvm-reduce -abort-on-invalid-reduction --aggressive-named-md-reduction --test %python --test-arg %p/Inputs/remove-metadata.py %s -o %t
; RUN: FileCheck --check-prefixes=AGGRESSIVE --implicit-check-not=! %s < %t

; RUN: llvm-reduce --test %python --test-arg %p/Inputs/remove-metadata.py %s -o %t
; RUN: llvm-reduce -abort-on-invalid-reduction --test %python --test-arg %p/Inputs/remove-metadata.py %s -o %t
; RUN: FileCheck --implicit-check-not=! %s < %t

@global = global i32 0, !dbg !0
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-reduce/remove-module-data.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; REQUIRES: x86-registered-target

; RUN: opt %s -S | FileCheck --check-prefix=CHECK-FILE %s
; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; 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
; RUN: FileCheck --check-prefix=CHECK-FINAL %s < %t

; CHECK-INTERESTINGNESS: declare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; Test that llvm-reduce can remove uninteresting function arguments from function definitions as well as their calls.
;
; RUN: llvm-reduce --test FileCheck --test-arg --check-prefix=CHECK-ALL --test-arg %s --test-arg --input-file %s -o %t
; RUN: llvm-reduce -abort-on-invalid-reduction --test FileCheck --test-arg --check-prefix=CHECK-ALL --test-arg %s --test-arg --input-file %s -o %t
; RUN: FileCheck --check-prefix=CHECK-ALL %s < %t

; CHECK-ALL: declare void @use(i32, i32, i32)
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/tools/llvm-reduce/skip-delta-passes.ll
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
; RUN: llvm-reduce --delta-passes=attributes --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=attributes --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: FileCheck -check-prefix=RESULT %s < %t

; RUN: llvm-reduce --delta-passes=instructions,attributes --skip-delta-passes=instructions --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=instructions,attributes --skip-delta-passes=instructions --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: FileCheck -check-prefix=RESULT %s < %t

; RUN: not llvm-reduce --skip-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
; RUN: not llvm-reduce -abort-on-invalid-reduction --skip-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


; CHECK-INTERESTINGNESS: @foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt --thinlto-bc --thinlto-split-lto-unit %s -o %t0
; RUN: llvm-reduce -write-tmp-files-as-bitcode --delta-passes=function-bodies,basic-blocks %t0 -o %t1 \
; RUN: llvm-reduce -abort-on-invalid-reduction -write-tmp-files-as-bitcode --delta-passes=function-bodies,basic-blocks %t0 -o %t1 \
; RUN: --test %python --test-arg %p/Inputs/llvm-dis-and-filecheck.py --test-arg llvm-dis --test-arg FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s
; RUN: llvm-dis < %t1* | FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-reduce/temporary-files-as-bitcode.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: llvm-reduce -write-tmp-files-as-bitcode --delta-passes=function-bodies,basic-blocks %s -o %t \
; RUN: llvm-reduce -abort-on-invalid-reduction -write-tmp-files-as-bitcode --delta-passes=function-bodies,basic-blocks %s -o %t \
; RUN: --test %python --test-arg %p/Inputs/llvm-dis-and-filecheck.py --test-arg llvm-dis --test-arg FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s
; RUN: FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s < %t

Expand Down
Loading