This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Add offset field to ds_permute/ds_bpermute instructions
ClosedPublic

Authored by tstellarAMD on Apr 18 2016, 1:10 PM.

Details

Summary

These instructions can add an immediate offset to the address, like other
ds instructions.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellarAMD retitled this revision from to AMDGPU/SI: Add offset field to ds_permute/ds_bpermute instructions.
tstellarAMD updated this object.
tstellarAMD added a reviewer: arsenm.
tstellarAMD added a subscriber: scchan.
arsenm added inline comments.Apr 26 2016, 1:21 PM
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
827 ↗(On Diff #54103)

Indentation

835 ↗(On Diff #54103)

How was this working before?

lib/Target/AMDGPU/SIInstrInfo.td
2606 ↗(On Diff #54103)

Why is offset1 not set to 0 now? It's called offset but I thought this was always called offset0 for the single offset instructions

lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
835 ↗(On Diff #54103)

All of the ds patterns are stand-alone patterns and they use an SDNodeXForm to convert the immediate to a target immediate. I couldn't get SDNodeXForm to work with the instruction's pattern, so I had to change this here.

lib/Target/AMDGPU/SIInstrInfo.td
2606 ↗(On Diff #54103)

The operand name is 'offset' for the single offset instructions.

Fix indentation.

arsenm accepted this revision.Apr 26 2016, 2:25 PM
arsenm edited edge metadata.

LGTM

lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
833 ↗(On Diff #55089)

So should the xform be removed now?

This revision is now accepted and ready to land.Apr 26 2016, 2:25 PM
This revision was automatically updated to reflect the committed changes.