[PATCH] Use getFirstNonPHI to set the insertion point for PHIs
mail at justinbogner.com
Thu Sep 26 17:22:26 PDT 2013
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
> (On a side note, you should request commit access; see http://llvm.org/docs/
> DeveloperPolicy.html#obtaining-commit-access .)
I'll do that. Thanks.
More information about the llvm-commits