This is an archive of the discontinued LLVM Phabricator instance.

LSV: Fix adjust alloca alignment trick for AMDGPU
ClosedPublic

Authored by arsenm on Sep 13 2018, 4:23 AM.

Details

Reviewers
volkan
bkramer
Summary

This was checking the hardcoded address space 0 for the stack.
Additionally, this should be checking for legality with
the adjusted alignment, so defer the alignment check.

Also try to split if the unaligned access isn't allowed.

Diff Detail

Event Timeline

arsenm created this revision.Sep 13 2018, 4:23 AM
arsenm added inline comments.Sep 13 2018, 4:26 AM
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
995–997

I guess this can result in increasing the alignment even if nothing is going to end up vectorized, but that's probably not that important

bkramer accepted this revision.Sep 13 2018, 6:13 AM
bkramer added inline comments.
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
995–997

I think this is fine. It's a bit awkward but not a big deal. It would be better to ask for an alignment that's actually going to help instead of StackAdjustedAlignment but that's out of scope or this change.

This revision is now accepted and ready to land.Sep 13 2018, 6:13 AM
arsenm closed this revision.Sep 17 2018, 7:07 PM

r342442