This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Insert waterfall loop for vector indexing
ClosedPublic

Authored by arsenm on Feb 21 2019, 8:10 AM.

Details

Summary

The register index can only really be an SGPR. Lie that a VGPR index
is legal, and then rewrite the instruction in a waterfall loop to
handle the index.

Diff Detail

Event Timeline

arsenm created this revision.Feb 21 2019, 8:10 AM
scott.linder added inline comments.Feb 22 2019, 8:49 AM
lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
333–336

Could you indicate the current limitations? I.e. only one, 32-bit operand per machine instruction.

385

Is this because we wouldn't gain anything more in regbankselect/instructionselect? Or because we don't need the type checking in G_PHI when we control the types? Or something else? I'm just curious as I'm not very familiar with GISel.

460

condition

arsenm marked 2 inline comments as done.Feb 22 2019, 9:06 AM
arsenm added inline comments.
lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
333–336

There's not much point since I have patches queued up to implement most of the rest of these restrictions

385

We can't really do anything with it, so might as well select it to the final instruction. The same kind of applies to the other phis, so I might revisit those later.

scott.linder accepted this revision.Feb 22 2019, 9:31 AM

LGTM then, but like I said I'm not very familiar with GlobalISel so more eyes might be good

This revision is now accepted and ready to land.Feb 22 2019, 9:31 AM
arsenm closed this revision.Mar 28 2019, 8:53 PM

r357235