[PATCH] Use getFirstNonPHI to set the insertion point for PHIs

Eli Friedman eli.friedman at gmail.com
Thu Sep 26 18:04:16 PDT 2013


On Thu, Sep 26, 2013 at 5:22 PM, Justin Bogner <mail at justinbogner.com>wrote:

> Eli Friedman <eli.friedman at gmail.com> writes:
> >On Thu, Sep 26, 2013 at 2:35 PM, Justin Bogner <mail at justinbogner.com>
> wrote:
> >> The attached patch uses getFirstNonPHI instead, and adds a testcase that
> >> crashes without the patch and passes with. Can someone please commit?
> >
> > The patch is missing a testcase for the LoopVectorize change.
>
> In LoopVectorize, a new BasicBlock is created and the PHI is inserted
> into it. Since the new BasicBlock is obviously empty, it's impossible
> for there to be a landingpad instruction, so getFirstInsertionPt and
> getFirstNonPHI are functionally equivalent. This means that there's no
> way to create a failing test.
>
> Even so, using getFirstInsertionPt is incorrect, and could lead to
> problems if things are shuffled around or if someone uses this as
> example code.
>

Okay.

Please try to hand-reduce the testcase a bit more; it looks like bugpoint
output at the moment.  Otherwise, looks fine; please commit.

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130926/5ab6b156/attachment.html>


More information about the llvm-commits mailing list