This is an archive of the discontinued LLVM Phabricator instance.

LoadStoreVectorizer: Split even sized illegal chains properly
ClosedPublic

Authored by arsenm on Feb 6 2017, 6:20 PM.

Details

Summary

Implement isLegalToVectorizeLoadChain for AMDGPU to avoid
producing private address spaces accesses that will need to be
split up later. This was doing the wrong thing in the case
where the queried chain was an even number of elements.

A possible <4 x i32> store was being split into
store <2 x i32>
store i32
store i32

rather than
store <2 x i32>
store <2 x i32>

when legal.

Diff Detail

Event Timeline

arsenm created this revision.Feb 6 2017, 6:20 PM
volkan edited edge metadata.Feb 7 2017, 7:13 AM

The changes in LoadStoreVectorizer LGTM.

Thanks,
Volkan

lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
132

I think a separate function for this check would be better. You can call that function in isLegalToVectorizeLoadChain and isLegalToVectorizeStoreChain.

137

Typo: legalization

arsenm accepted this revision.Feb 22 2017, 8:10 PM
arsenm marked 2 inline comments as done.

r295933

This revision is now accepted and ready to land.Feb 22 2017, 8:10 PM
arsenm closed this revision.Feb 22 2017, 8:10 PM