This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Start selecting image intrinsics
ClosedPublic

Authored by arsenm on Feb 10 2020, 6:12 AM.

Details

Reviewers
nhaehnle
kerbowa
Summary

Does not handled atomics yet.

Diff Detail

Event Timeline

arsenm created this revision.Feb 10 2020, 6:12 AM
foad added a subscriber: foad.Feb 25 2020, 3:29 AM
foad added inline comments.
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
1362

STI.hasNSAEncoding()?

1418

STI.hasR128A16()?

1452

Looks like a spurious change.

arsenm updated this revision to Diff 252095.Mar 23 2020, 10:35 AM
arsenm marked 2 inline comments as done.

Rebase

Flakebi added inline comments.
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.a16.dim.ll
77–79

It looks like the code should produce correct results but why is s0/s12 put into the undefined part?

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.store.2d.ll
2–4

Is gfx9 missing here on purpose?

nhaehnle accepted this revision.Mar 30 2020, 8:10 AM

flakebi is right that some of the A16 codegen looks dodgy, but that may be due to legalization? I think it's okay to land this patch to get started.

This revision is now accepted and ready to land.Mar 30 2020, 8:10 AM
arsenm marked an inline comment as done.Mar 30 2020, 12:50 PM
arsenm added inline comments.
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.a16.dim.ll
77–79

We're really missing any combines necessary to cleanup legalization