<div dir="ltr"><br><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 22, 2018 at 9:41 AM, Xin Tong via Phabricator via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">trentxintong added a comment.<br>
<br>
Hi @brzycki. This is a deficiency in a feature we already have. In jump threading, when we can tell all the predecessors of a block go to the same destination. we do not need to thread, we can just fold the terminator of the block. This has less impact on the CFG and also we do not have the problem of not being able to jump threading because the block can not be duplicated.<br>
<br>
In case we have a Val being UNDEF, we can ignore it as it can be treated as going to any successor, i.e. we should not go to MultipleDestSentinel state because we seeĀ  a DestBB==nullptr.<br></blockquote><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">This is not generally true.</span><div style="font-size:small;text-decoration-style:initial;text-decoration-color:initial">It's only true if the block is unreachable.</div><div><br></div></div></div><br></div></div>