This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Match global saddr addressing mode
ClosedPublic

Authored by arsenm on Aug 17 2020, 5:37 AM.

Diff Detail

Event Timeline

arsenm created this revision.Aug 17 2020, 5:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2020, 5:37 AM
arsenm requested review of this revision.Aug 17 2020, 5:37 AM
foad accepted this revision.Aug 17 2020, 7:40 AM

Looks good.

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
3298

How do we handle the addressing mode where there is no saddr, just vaddr+offset?

This revision is now accepted and ready to land.Aug 17 2020, 7:40 AM
arsenm added inline comments.Aug 17 2020, 7:42 AM
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
3298

Yes. The case this doesn't handle (which I haven't done in the DAG either) is: (SGPR64 + imm), which does require initializing the VGPR offset to 0, but this is fewer instructions than the two required to copy an SGPR64 to VGPR64

arsenm closed this revision.Aug 17 2020, 12:48 PM

Rebased and moved IR test changes to shift optimization patch a9ee0589a8bc1584af4209fe6439c68aa875065f