This is an archive of the discontinued LLVM Phabricator instance.

[LV] Remove type restriction for vector phi creation
ClosedPublic

Authored by mssimpso on Feb 9 2017, 10:58 AM.

Details

Summary

We previously only created a vector phi node for an induction variable if its type matched the type of the canonical induction variable. I don't recall why this restriction exists, but it doesn't seem to be necessary.

I'm planning to extend vector phi creation with a few more follow-ons. First, we don't need to require constant-steps (the steps only need to be loop invariant). And second, we can merge the floating point induction widening code into the integer widening code. There's already some overlap, and if we do so, we'll be able to create vector phi nodes for some floating point inductions.

Diff Detail

Repository
rL LLVM

Event Timeline

mssimpso created this revision.Feb 9 2017, 10:58 AM
mkuper edited edge metadata.Feb 9 2017, 11:28 AM

Thanks, Matt!

I agree this isn't necessary - I was planning on pretty much the same sequence (first enable this for the primary IV, then for everything that matches its type, then for all integers, then for loop-invariant steps), but never got beyond step 2, see https://reviews.llvm.org/D20932?id=59460#inline-178373 :-)
LGTM!

mkuper accepted this revision.Feb 9 2017, 11:29 AM
This revision is now accepted and ready to land.Feb 9 2017, 11:29 AM

Ah, I must have missed that comment. Good to know this was planned all along! Thanks for the review!

This revision was automatically updated to reflect the committed changes.