[llvm] d78b4c4 - llvm-reduce: Fix default handling of intermediate format

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 19:21:21 PST 2023


Author: Matt Arsenault
Date: 2023-01-20T23:21:13-04:00
New Revision: d78b4c44ab1c75fbc94d9ce2fc2db0c959e5864d

URL: https://github.com/llvm/llvm-project/commit/d78b4c44ab1c75fbc94d9ce2fc2db0c959e5864d
DIFF: https://github.com/llvm/llvm-project/commit/d78b4c44ab1c75fbc94d9ce2fc2db0c959e5864d.diff

LOG: llvm-reduce: Fix default handling of intermediate format

Bitcode inputs should produce bitcode intermediates by
default.

Added: 
    

Modified: 
    llvm/test/tools/llvm-reduce/file-output-type.test
    llvm/tools/llvm-reduce/ReducerWorkItem.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-reduce/file-output-type.test b/llvm/test/tools/llvm-reduce/file-output-type.test
index 4d7b35d7d7f23..3c5c7d4e16897 100644
--- a/llvm/test/tools/llvm-reduce/file-output-type.test
+++ b/llvm/test/tools/llvm-reduce/file-output-type.test
@@ -7,20 +7,20 @@
 # RUN: llvm-as -disable-output reduced.ll
 
 
-# A .bc input file should default to bitcode output, in reduced.bc
+# A .bc input file should default to bitcode output, in reduced.bc (with bitcode intermediates)
 # RUN: rm -f reduced.ll reduced.bc
-# RUN: llvm-reduce --delta-passes=instructions --test FileCheck --test-arg %s --test-arg --input-file test-output-format.bc
+# RUN: llvm-reduce --delta-passes=instructions --test %python --test-arg %p/Inputs/llvm-dis-and-filecheck.py --test-arg llvm-dis --test-arg FileCheck --test-arg %s test-output-format.bc
 # RUN: llvm-dis -disable-output reduced.bc
 
 
 # A .bc input file with a requested .bc output should produce bitcode
-# RUN: llvm-reduce --delta-passes=instructions -o %t.0.bc --test FileCheck --test-arg %s --test-arg --input-file test-output-format.bc
+# RUN: llvm-reduce --delta-passes=instructions -o %t.0.bc --test %python --test-arg %p/Inputs/llvm-dis-and-filecheck.py --test-arg llvm-dis --test-arg FileCheck --test-arg %s test-output-format.bc
 # RUN: llvm-dis -disable-output %t.0.bc
 
 
 # A .bc input file with a requested .ll output
 # RUN: rm -f reduced.ll reduced.bc
-# RUN: llvm-reduce --delta-passes=instructions -o %t.0.ll --test FileCheck --test-arg %s --test-arg --input-file test-output-format.bc
+# RUN: llvm-reduce --delta-passes=instructions -o %t.0.ll --test %python --test-arg %p/Inputs/llvm-dis-and-filecheck.py --test-arg llvm-dis --test-arg FileCheck --test-arg %s test-output-format.bc
 # RUN: llvm-dis -disable-output %t.0.ll
 
 

diff  --git a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp
index c3ca7772a1fd2..74107ad0f0b22 100644
--- a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp
+++ b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp
@@ -449,8 +449,7 @@ bool ReducerWorkItem::isReduced(const TestRunner &Test) const {
 
   ToolOutputFile Out(CurrentFilepath, FD);
 
-  // FIXME: This should be UseBitcode
-  writeOutput(Out.os(), TmpFilesAsBitcode);
+  writeOutput(Out.os(), UseBitcode);
 
   Out.os().close();
   if (Out.os().has_error()) {


        


More information about the llvm-commits mailing list