This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Handle image atomics
ClosedPublic

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

Details

Reviewers
nhaehnle
kerbowa

Diff Detail

Event Timeline

arsenm created this revision.Feb 10 2020, 6:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2020, 6:13 AM
foad added a subscriber: foad.Mar 19 2020, 9:22 AM
foad added inline comments.
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
1284

If I rebase this patch (plus some of your others...) on current master, this assertion fails during testing. Any idea why?

(gdb) up 4
#4  0x0000000003a8cc76 in llvm::AMDGPUInstructionSelector::selectImageIntrinsic (this=0x7851850, MI=..., Intr=0x150cd70 <llvm::AMDGPU::ImageDimIntrinsicTable+192>) at /home/jayfoad2/git/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:1284
1284	      assert(MI.getOperand(3).getReg() == AMDGPU::NoRegister);
(gdb) call MI.dump()
  %14:vgpr_32(s32) = G_AMDGPU_INTRIN_IMAGE_LOAD intrinsic(@llvm.amdgcn.image.atomic.cmpswap.1d), %1:vgpr(s32), %2:vgpr(s32), %3:vgpr(s32), %0:sgpr(<8 x s32>), 0, 0 :: (volatile dereferenceable load store 4 on custom "TargetCustom8")
This revision is now accepted and ready to land.Mar 30 2020, 8:12 AM