[PATCH] Use getFirstNonPHI to set the insertion point for PHIs
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>
> >> 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.
Please try to hand-reduce the testcase a bit more; it looks like bugpoint
output at the moment. Otherwise, looks fine; please commit.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits