This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Have load lowering handle some unaligned accesses
ClosedPublic

Authored by arsenm on Jul 26 2021, 2:25 PM.

Details

Summary

The code for splitting an unaligned access into 2 pieces is
essentially the same as for splitting a non-power-of-2 load for
scalars. It would be better to pick an optimal memory access size and
directly use it, but splitting in half is what the DAG does.

As-is this fixes handling of some unaligned sextload/zextloads for
AMDGPU. In the future this will help drop the ugly abuse of
narrowScalar to handle splitting unaligned accesses.

Diff Detail

Event Timeline

arsenm created this revision.Jul 26 2021, 2:25 PM
arsenm requested review of this revision.Jul 26 2021, 2:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2021, 2:25 PM
Herald added a subscriber: wdng. · View Herald Transcript
aemerson accepted this revision.Jul 26 2021, 3:05 PM
This revision is now accepted and ready to land.Jul 26 2021, 3:05 PM

What about for stores?

What about for stores?

Also should get an equivalent change but I'm doing them one at a time