[PATCH] D98085: [AMDGPU] Always expand system scope fp atomics on gfx90a

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 5 17:18:13 PST 2021


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:11952
 
-      if (Subtarget->hasGFX90AInsts())
+      if (Subtarget->hasGFX90AInsts()) {
+        auto SSID = RMW->getSyncScopeID();
----------------
arsenm wrote:
> Is this actually target specific? I thought this might have been all targets
Yes, it is specific to this and only this target.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:11954-11955
+        auto SSID = RMW->getSyncScopeID();
+        if (SSID == SyncScope::System ||
+            SSID == RMW->getContext().getOrInsertSyncScopeID("one-as"))
+          return AtomicExpansionKind::CmpXChg;
----------------
arsenm wrote:
> Isn't there some scope greater or equal function? Should avoid directly referencing one-as
It is, but it is located in the MMI whcih is not yet available here. In fact I don't even have MF yet to query it.

Anyway since it is specific to the only target and that target does not have a higher scope I suppose it shall be OK.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98085/new/

https://reviews.llvm.org/D98085



More information about the llvm-commits mailing list