This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Implement select for 32-bit G_ADD
ClosedPublic

Authored by tstellar on Feb 28 2019, 5:31 PM.

Diff Detail

Event Timeline

tstellar created this revision.Feb 28 2019, 5:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2019, 5:31 PM
arsenm added inline comments.Feb 28 2019, 6:11 PM
test/CodeGen/AMDGPU/GlobalISel/inst-select-add.mir
1

I’ve just been generating all of the global isel test checks

4

Can you include the type in the name

40

64-bit scalar at least looks like is already handled that should have a test here

tstellar updated this revision to Diff 193643.Apr 3 2019, 7:32 PM

Clean up test

tstellar marked 3 inline comments as done.Apr 3 2019, 7:33 PM
tstellar added inline comments.
test/CodeGen/AMDGPU/GlobalISel/inst-select-add.mir
40

Where did you see this? I tried to add the test, but it complained that 64-bit G_ADD was not legal.

arsenm added inline comments.Apr 4 2019, 6:25 AM
test/CodeGen/AMDGPU/GlobalISel/inst-select-add.mir
40

bool AMDGPUInstructionSelector::selectG_ADD(MachineInstr &I) const {
Creates an S_ADD_U32 + S_ADDC_U32 pair

tstellar marked an inline comment as done.May 24 2019, 7:19 PM
tstellar added inline comments.
test/CodeGen/AMDGPU/GlobalISel/inst-select-add.mir
40

Because 64-bit G_ADD is not legal yet, this code is only ever called when selecting G_GEP.

arsenm added inline comments.May 24 2019, 7:26 PM
llvm/lib/Target/AMDGPU/AMDGPUGISel.td
132 ↗(On Diff #193643)

Should use the _e64 version

arsenm accepted this revision.Jun 29 2019, 7:53 PM

LGTM

llvm/lib/Target/AMDGPU/AMDGPUGISel.td
132 ↗(On Diff #193643)

I tried to do this, but there are a few problems. I have a supplemental patch which uses the right version for gfx9.

This revision is now accepted and ready to land.Jun 29 2019, 7:53 PM
This revision was automatically updated to reflect the committed changes.