<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion `NodeB && "B must be in the tree"' with opt -passes='sink'"
   href="https://bugs.llvm.org/show_bug.cgi?id=51160">51160</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `NodeB && "B must be in the tree"' with opt -passes='sink'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Scalar Optimizations
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mikael.holmen@ericsson.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25045" name="attach_25045" title="bbi-58422.ll reproducer">attachment 25045</a> <a href="attachment.cgi?id=25045&action=edit" title="bbi-58422.ll reproducer">[details]</a></span>
bbi-58422.ll reproducer

llvm commit: 732a8a9dfb3e

Reproduce with:
 opt -passes='sink' -o /dev/null bbi-58422.ll

Result:
 opt: ../include/llvm/Support/GenericDomTree.h:484: NodeT
*llvm::DominatorTreeBase<llvm::BasicBlock,
false>::findNearestCommonDominator(NodeT *, NodeT *) const [NodeT =
llvm::BasicBlock, IsPostDom = false]: Assertion `NodeB && "B must be in the
tree"' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments: ../../master-github/llvm/build-all-builtins/bin/opt
-passes=sink -o /dev/null bbi-58422.ll
 #0 0x0000000002aaa143 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(../../master-github/llvm/build-all-builtins/bin/opt+0x2aaa143)
 #1 0x0000000002aa7dbe llvm::sys::RunSignalHandlers()
(../../master-github/llvm/build-all-builtins/bin/opt+0x2aa7dbe)
 #2 0x0000000002aaa4c6 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007efe6cb35630 __restore_rt sigaction.c:0:0
 #4 0x00007efe6a268387 raise (/lib64/libc.so.6+0x36387)
 #5 0x00007efe6a269a78 abort (/lib64/libc.so.6+0x37a78)
 #6 0x00007efe6a2611a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
 #7 0x00007efe6a261252 (/lib64/libc.so.6+0x2f252)
 #8 0x00000000021df922 llvm::DominatorTreeBase<llvm::BasicBlock,
false>::findNearestCommonDominator(llvm::BasicBlock*, llvm::BasicBlock*) const
(../../master-github/llvm/build-all-builtins/bin/opt+0x21df922)
 #9 0x0000000002990aeb iterativelySinkInstructions(llvm::Function&,
llvm::DominatorTree&, llvm::LoopInfo&, llvm::AAResults&) Sink.cpp:0:0
#10 0x0000000002990238 llvm::SinkingPass::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(../../master-github/llvm/build-all-builtins/bin/opt+0x2990238)
#11 0x0000000002da902d llvm::detail::PassModel<llvm::Function,
llvm::SinkingPass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0
#12 0x0000000002295655 llvm::PassManager<llvm::Function,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(../../master-github/llvm/build-all-builtins/bin/opt+0x2295655)
#13 0x0000000000aca3fd llvm::detail::PassModel<llvm::Function,
llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >,
llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>
<span class="quote">>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0</span >
#14 0x0000000002299936 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all-builtins/bin/opt+0x2299936)
#15 0x0000000000794f7d llvm::detail::PassModel<llvm::Module,
llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#16 0x0000000002294848 llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all-builtins/bin/opt+0x2294848)
#17 0x000000000078d2e0 llvm::runPassPipeline(llvm::StringRef, llvm::Module&,
llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*,
llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef,
llvm::ArrayRef<llvm::StringRef>, llvm::opt_tool::OutputKind,
llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool)
(../../master-github/llvm/build-all-builtins/bin/opt+0x78d2e0)
#18 0x000000000079fbc5 main
(../../master-github/llvm/build-all-builtins/bin/opt+0x79fbc5)
#19 0x00007efe6a254555 __libc_start_main (/lib64/libc.so.6+0x22555)
#20 0x00000000007880fc _start
(../../master-github/llvm/build-all-builtins/bin/opt+0x7880fc)
Abort</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>