<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/78049>78049</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Assertion `NodeB && "B must be in the tree"' failed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            fhahn,
            bjope
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          JonPsson1
      </td>
    </tr>
</table>

<pre>
    opt -O3 -sroa-skip-mem2reg -enable-dfa-jump-thread tc_dt.ll
[tc_dt.tar.gz](https://github.com/llvm/llvm-project/files/13928836/tc_dt.tar.gz)

GenericDomTree.h:501: NodeT* llvm::DominatorTreeBase<NodeT, IsPostDom>::findNearestCommonDominator(NodeT*, NodeT*) const [with NodeT = llvm::BasicBlock; 
bool IsPostDom = false]: Assertion `NodeB && "B must be in the tree"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.

Reduced test case attached, but have not looked into it. Adding people high in the log...

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykU02PrDYQ_DXNpQUCe5iFAwfY2YkSRS-r5N0jYzfgHYOR3byn5NdHMLPZzTHJhQ-7q6q7Sq1itONC1EDZgRDDpKYFhADxDEL0b36l_a-8JGrjyYfmJ7-8xuiXIum9-aPxK2P6i8Q0Bq_SeLNrOtMsAo2Y0qJ6R6kZVPq2zWvKUyBlkPXvhjPnIL9A3kLZ3Q9YhWz8E8oLiGpiXiPIFsQVxHW0PG19pv0M4urct_dXugb_RppBXAfrKIK4FrIWVSXPIK7_YBX1Q-14_kALBasvfv4aiLIJZFvmBcgWv3hDX0G0eMjIFmR78bNdFPuw13YqEsjnR9kz_hhffeSLn0G-3MsHu5gvpAJFfvbz7Je_8SCqd_od-vFdo_ZLZISy-255ut8gyMunLjoVre6c1zeQHd7H6L13Hx0cgEG5SLuHssU2Rgps_YJwznfODkGcQZwRhOhw3iJjT2gX5ImQAx1JiycclHVksrvI688v7W8vGLd-towK-23EQKsPjOzxXwdlY9yOpFAtBu2i3WboaEAHFSfslb5xUJqyz4H9SmbTZJApMmoVCRWz0hOZ3cl-Y5zUN8LFMzrvb7Qzs0fLGbbG2GXElfzqCCc7Tu8TOz9m2UMmMY00taxVQk3xlJfFWdYnkUyNLs9lXfV5XZV6kENZCVMV57M0lOelLlViG5GLU14UcsfkIqt6M2hTVnUhqdJygFNOs7Iu253IfBiTw4PmqcpPdeJUTy4-lm-h73hcPlYuNId7_TZGOOXORo4fLGzZUfN_Q0624Jr_nuIxxF8BAAD__x8tWFo">