<div dir="ltr">On Thu, Sep 26, 2013 at 5:22 PM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Eli Friedman <<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>> writes:<br>
>On Thu, Sep 26, 2013 at 2:35 PM, Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br>
</div><div class="im">>> The attached patch uses getFirstNonPHI instead, and adds a testcase that<br>
>> crashes without the patch and passes with. Can someone please commit?<br>
><br>
> The patch is missing a testcase for the LoopVectorize change.<br>
<br>
</div>In LoopVectorize, a new BasicBlock is created and the PHI is inserted<br>
into it. Since the new BasicBlock is obviously empty, it's impossible<br>
for there to be a landingpad instruction, so getFirstInsertionPt and<br>
getFirstNonPHI are functionally equivalent. This means that there's no<br>
way to create a failing test.<br>
<br>
Even so, using getFirstInsertionPt is incorrect, and could lead to<br>
problems if things are shuffled around or if someone uses this as<br>
example code.<br></blockquote><div><br></div><div>Okay.</div><div><br></div><div>Please try to hand-reduce the testcase a bit more; it looks like bugpoint output at the moment.  Otherwise, looks fine; please commit.<br></div>
<div><br></div><div>-Eli</div><div> </div></div></div></div>