This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Fix some legalization of < dword vector stores
ClosedPublic

Authored by arsenm on Jun 10 2020, 7:48 AM.

Details

Summary

This avoids many instances of failing to legalize a vector truncstore
of <4 x s8> to 2 bytes. We don't perfectly handle every truncstore
yet, largely because the given set of legalization actions can't
actually differentiate between changing the result type and changing
the memory type.

Diff Detail

Event Timeline

arsenm created this revision.Jun 10 2020, 7:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2020, 7:48 AM
foad added inline comments.Jun 15 2020, 7:24 AM
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
126–127

This comment doesn't make sense given the Size < 32 condition two lines above.

arsenm marked an inline comment as done.Jun 15 2020, 7:47 AM
arsenm added inline comments.
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
126–127

Well, this is what you get for <4 x s8> if it were to go down either path

arsenm updated this revision to Diff 270763.Jun 15 2020, 8:30 AM

Make code more consistent with comment

arsenm updated this revision to Diff 271177.Jun 16 2020, 1:01 PM

Also make sure <2 x s8> is casted

This revision is now accepted and ready to land.Jun 24 2020, 11:50 PM