Skip to content

Commit

Permalink
[NFC][Reduce] Add a test showing that we fail to to reduce single/las…
Browse files Browse the repository at this point in the history
…t feature
  • Loading branch information
LebedevRI committed Jul 22, 2020
1 parent 4464d90 commit 68922f7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions llvm/test/Reduce/remove-all-of-multiple-args.ll
@@ -0,0 +1,12 @@
; 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

define i32 @t(i32 %a0, i32 %a1, i32 %a2) {
; CHECK-ALL-LABEL: @t
; CHECK-FINAL: (i32 %a0) {
;
; CHECK-INTERESTINGNESS: ret i32
; CHECK-FINAL: ret i32 undef

ret i32 %a1
}
12 changes: 12 additions & 0 deletions llvm/test/Reduce/remove-single-arg.ll
@@ -0,0 +1,12 @@
; 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

define i32 @t(i32 %a0) {
; CHECK-ALL-LABEL: @t
; CHECK-FINAL: (i32 %a0) {
;
; CHECK-INTERESTINGNESS: ret i32
; CHECK-FINAL: ret i32 42

ret i32 42
}

0 comments on commit 68922f7

Please sign in to comment.