; 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
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()
; 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
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";