https://bugs.llvm.org/show_bug.cgi?id=46818

            Bug ID: 46818
           Summary: [Reduce] basic block reduction assumes callinst
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-reduce
          Assignee: unassignedb...@nondot.org
          Reporter: lebedev...@gmail.com
                CC: dblai...@gmail.com, llvm-bugs@lists.llvm.org

Just so i don't forget later on,

diff --git a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
index 002d81a6748..e049c6f405c 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
@@ -41,6 +41,7 @@ static void replaceBranchTerminator(BasicBlock &BB,
   if (auto IndBI = dyn_cast<IndirectBrInst>(Term))
     Address = IndBI->getAddress();

+  Term->replaceAllUsesWith(UndefValue::get(Term->getType()));
   Term->eraseFromParent();

   if (ChunkSucessors.empty()) {

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to