This is an archive of the discontinued LLVM Phabricator instance.

[Scalarizer] Handle scalar arguments in vector GEP
ClosedPublic

Authored by uabelho on Mar 28 2017, 12:15 AM.

Details

Summary

Triggered by commit r298620: "[LV] Vectorize GEPs".

If we encounter a vector GEP with scalar arguments, we splat the scalar
into a vector of appropriate size before we scatter the argument.

Diff Detail

Repository
rL LLVM

Event Timeline

uabelho created this revision.Mar 28 2017, 12:15 AM

I don't know who should review this so I simply added the three guys that last made changes in the Scalarizer.

arsenm added inline comments.Mar 28 2017, 12:27 AM
test/Transforms/Scalarizer/vector-gep.ll
1 ↗(On Diff #93216)

You should be able to drop the -o -

19 ↗(On Diff #93216)

CHECK-LABEL

101 ↗(On Diff #93216)

Maybe add another test with inbounds?

uabelho updated this revision to Diff 93219.Mar 28 2017, 1:06 AM

Addressed Matt's comments.

uabelho marked 3 inline comments as done.Mar 28 2017, 1:06 AM

Thanks for the comments!

Hi Mikael,

r298620 was temporarily reverted because it exposed some other issues with vector GEP handling, but I plan to recommit it. Would you like for me to wait until after this patch is committed, or does it matter for your work?

Hi Mikael,

r298620 was temporarily reverted because it exposed some other issues with vector GEP handling, but I plan to recommit it. Would you like for me to wait until after this patch is committed, or does it matter for your work?

Yes I saw and it doesn't matter, you can recommit when you want. I've done the Scalarizer changes locally in our repo since a few days anyway.

bjope added a subscriber: bjope.Mar 29 2017, 12:59 AM
arsenm accepted this revision.Mar 30 2017, 10:36 AM

LGTM

This revision is now accepted and ready to land.Mar 30 2017, 10:36 AM
This revision was automatically updated to reflect the committed changes.