This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/Uniformity/GlobalISel: G_AMDGPU atomics are always divergent
ClosedPublic

Authored by Acim-Maravic on Aug 4 2023, 6:19 AM.

Diff Detail

Event Timeline

Acim-Maravic created this revision.Aug 4 2023, 6:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2023, 6:19 AM
Acim-Maravic requested review of this revision.Aug 4 2023, 6:19 AM
arsenm added inline comments.Aug 4 2023, 6:23 AM
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
8663

Isn't this covered by this already?

foad added inline comments.Aug 4 2023, 6:24 AM
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
8626

Can we detect these by looking at the MachineMemOperands, so we don't have to maintain yet another big list of opcodes?

Petar.Avramovic added inline comments.Aug 4 2023, 7:33 AM
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
8626

Mem operand might be missing something, MMO.isAtomic() does not work.
In ir, buffer atomic intrinsic looks like any other intrinsic, maybe we are missing something in getTgtMemIntrinsic, or legalizer (legalizer translates these to G_AMDGPU...)

8663

This is for G_ATOMIC... (generic rmw atomics), we need to handle G_AMDGPU_ .. ATOMIC ..

arsenm added inline comments.Aug 4 2023, 7:35 AM
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
8663

This should come down here with the others then

arsenm requested changes to this revision.Aug 10 2023, 2:53 PM

Should move it down with the other cases, I do think we're missing some verifier checks for not dropping MMOs on atomics

This revision now requires changes to proceed.Aug 10 2023, 2:53 PM
arsenm accepted this revision.Aug 18 2023, 9:13 AM
This revision is now accepted and ready to land.Aug 18 2023, 9:13 AM
This revision was landed with ongoing or failed builds.Aug 18 2023, 9:25 AM
This revision was automatically updated to reflect the committed changes.