[llvm-bugs] [Bug 46818] New: [Reduce] basic block reduction assumes	callinst
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Thu Jul 23 06:32:12 PDT 2020
    
    
  
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: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: dblaikie at gmail.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200723/98587277/attachment.html>
    
    
More information about the llvm-bugs
mailing list