diff options
| author | David Blaikie <dblaikie@gmail.com> | 2019-09-10 20:52:14 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2019-09-10 20:52:14 +0000 |
| commit | 699bea494c01fffe351223d8064ed8a091b13957 (patch) | |
| tree | ce87401d78fc6818241f0dbf94a903e89402380e | |
| parent | 6c6f5a9984525a23229b26cc4527cc2cb90375d0 (diff) | |
| download | bcm5719-llvm-699bea494c01fffe351223d8064ed8a091b13957.tar.gz bcm5719-llvm-699bea494c01fffe351223d8064ed8a091b13957.zip | |
llvm-reduce: Simplify testing using -implicit-check-not
Also fix llvm-reduce to use the specified output file name directly,
without appending '.ll' to the name.
llvm-svn: 371555
| -rw-r--r-- | llvm/test/Reduce/remove-funcs.ll | 7 | ||||
| -rw-r--r-- | llvm/test/Reduce/remove-global-vars.ll | 6 | ||||
| -rw-r--r-- | llvm/tools/llvm-reduce/llvm-reduce.cpp | 2 |
3 files changed, 4 insertions, 11 deletions
diff --git a/llvm/test/Reduce/remove-funcs.ll b/llvm/test/Reduce/remove-funcs.ll index 301b1941910..d8b493d819c 100644 --- a/llvm/test/Reduce/remove-funcs.ll +++ b/llvm/test/Reduce/remove-funcs.ll @@ -10,10 +10,10 @@ ; then include the rest of the test script ; RUN: cat %p/Inputs/remove-funcs.py >> %t/test.py -; RUN: llvm-reduce --test %t/test.py %s -o - | FileCheck %s +; RUN: llvm-reduce --test %t/test.py %s -o %t/out.ll +; RUN: cat %t/out.ll | FileCheck -implicit-check-not=uninteresting %s ; REQUIRES: plugins -; CHECK-NOT: uninteresting1() define i32 @uninteresting1() { entry: ret i32 0 @@ -24,16 +24,13 @@ define i32 @interesting() { entry: ; CHECK: call i32 @interesting() %call2 = call i32 @interesting() - ; CHECK-NOT: call i32 @uninteresting1() %call = call i32 @uninteresting1() ret i32 5 } -; CHECK-NOT: uninteresting2() define i32 @uninteresting2() { entry: ret i32 0 } -; CHECK-NOT: uninteresting3() declare void @uninteresting3() diff --git a/llvm/test/Reduce/remove-global-vars.ll b/llvm/test/Reduce/remove-global-vars.ll index 8588de52b4c..d9fb997d837 100644 --- a/llvm/test/Reduce/remove-global-vars.ll +++ b/llvm/test/Reduce/remove-global-vars.ll @@ -10,24 +10,22 @@ ; then include the rest of the test script ; RUN: cat %p/Inputs/remove-global-vars.py >> %t/test.py -; RUN: llvm-reduce --test %t/test.py %s -o - | FileCheck %s +; RUN: llvm-reduce --test %t/test.py %s -o %t/out.ll +; RUN: cat %t/out.ll | FileCheck -implicit-check-not=uninteresting %s ; REQUIRES: plugins ; CHECK: @interesting = global @interesting = global i32 0, align 4 -; CHECK-NOT: global @uninteresting = global i32 1, align 4 define i32 @main() { entry: - ; CHECK-NOT: load i32, i32* @uninteresting, align 4 %0 = load i32, i32* @uninteresting, align 4 ; CHECK: store i32 undef, i32* @interesting, align 4 store i32 %0, i32* @interesting, align 4 ; CHECK: load i32, i32* @interesting, align 4 %1 = load i32, i32* @interesting, align 4 - ; CHECK-NOT: store i32 %1, i32* @uninteresting, align 4 store i32 %1, i32* @uninteresting, align 4 ; CHECK: %inc = add nsw i32 undef, 1 diff --git a/llvm/tools/llvm-reduce/llvm-reduce.cpp b/llvm/tools/llvm-reduce/llvm-reduce.cpp index ec82ecbe7c7..6836e1dbee4 100644 --- a/llvm/tools/llvm-reduce/llvm-reduce.cpp +++ b/llvm/tools/llvm-reduce/llvm-reduce.cpp @@ -99,8 +99,6 @@ int main(int argc, char **argv) { OutputFilename = InputFilename.c_str(); else if (OutputFilename.empty()) OutputFilename = "reduced.ll"; - else - OutputFilename += ".ll"; sys::fs::copy_file(Tester.getReducedFilepath(), OutputFilename); errs() << "\nDone reducing! Reduced testcase: " << OutputFilename << "\n"; |

