<div dir="ltr">If you want to be defensive, youc ould turn the whole loop into an assert(any_of(...)) - that way we'll find it if the situation comes up for anyone doing a +Asserts build, and we can get a test case and from there/decide if we need the functionality, etc.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 31, 2016 at 11:31 AM, Justin Bogner 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">There's some code near the end of TailDuplicate to handle "the nasty<br>
case in that we duplicated a block that is part of a loop into some but<br>
not all of its predecessors."<br>
<br>
I noticed that this isn't covered by our existing tests and spent some<br>
time trying to come up with an example it actually hits. I tried hand<br>
rolling something based on the explanation in the comment, but couldn't<br>
get anything that didn't abort tail duplication earlier for one reason<br>
or another.<br>
<br>
Then, I applied the attached patch (with tail-dup-size cranked up so<br>
this would fire more) and ran a bootstrap of clang and the nightly test<br>
suite - the assert was never hit.<br>
<br>
I suspect that things have changed and the situation this code handles<br>
can't happen anymore. Should we remove it?<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>