[llvm] 68922f7 - [NFC][Reduce] Add a test showing that we fail to to reduce single/last feature
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 06:12:33 PDT 2020
Author: Roman Lebedev
Date: 2020-07-22T16:11:56+03:00
New Revision: 68922f7f2c231726f54d7fbc82e58f17986e3db6
URL: https://github.com/llvm/llvm-project/commit/68922f7f2c231726f54d7fbc82e58f17986e3db6
DIFF: https://github.com/llvm/llvm-project/commit/68922f7f2c231726f54d7fbc82e58f17986e3db6.diff
LOG: [NFC][Reduce] Add a test showing that we fail to to reduce single/last feature
Added:
llvm/test/Reduce/remove-all-of-multiple-args.ll
llvm/test/Reduce/remove-single-arg.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Reduce/remove-all-of-multiple-args.ll b/llvm/test/Reduce/remove-all-of-multiple-args.ll
new file mode 100644
index 000000000000..4ec0ea498b5d
--- /dev/null
+++ b/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
+}
diff --git a/llvm/test/Reduce/remove-single-arg.ll b/llvm/test/Reduce/remove-single-arg.ll
new file mode 100644
index 000000000000..626720f9361c
--- /dev/null
+++ b/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
+}
More information about the llvm-commits
mailing list