[PATCH] D85125: TableGen/GlobalISel: Hack the operand order for atomic_store

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 05:21:35 PDT 2020


arsenm created this revision.
arsenm added reviewers: dsanders, paquette, aemerson, aditya_nandakumar, reames.
Herald added subscribers: kerbowa, jfb, hiraditya, kristof.beyls, tpr, rovka, nhaehnle, jvesely.
Herald added a project: LLVM.
arsenm requested review of this revision.
Herald added a subscriber: wdng.

ISD::ATOMIC_STORE arbitrarily has the operands in the opposite order
from regular ISD::STORE, which always introduced an annoying
duplication of patterns to handle both cases. Since in GlobalISel
there's just the one G_STORE, we need to swap the operands to
correctly emit the type check for the pointer operand.

      

Some work started in 20aafa31569b5157e792daa8860d71dd0df8a53a to
migrate SelectionDAG to use ISD::STORE for atomics, but that work
seems to have stalled. Since this is the pretty much the last
operation which matters which isn't supported for AMDGPU, use this
compatibility hack to unblock declaring it functionally complete.

      

Not sure what's going on with the pending_phis AArch64 test. It seems
it didn't always use atomics, and I'm not sure what it was originally
testing matters anymore.


https://reviews.llvm.org/D85125

Files:
  llvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
  llvm/lib/Target/AMDGPU/AMDGPUGISel.td
  llvm/lib/Target/AMDGPU/DSInstructions.td
  llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-atomic-flat.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-atomic-local.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-flat.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-global.mir
  llvm/test/TableGen/Common/GlobalISelEmitterCommon.td
  llvm/test/TableGen/GlobalISelEmitter-atomic_store.td
  llvm/utils/TableGen/GlobalISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85125.282593.patch
Type: text/x-patch
Size: 41691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200803/92751c74/attachment.bin>


More information about the llvm-commits mailing list