[PATCH] D149986: AMDGPU: Force sc0 and sc1 on stores for gfx940 and gfx941

Konstantin Zhuravlyov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 09:27:01 PDT 2023


kzhuravl marked an inline comment as done.
kzhuravl added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp:524
+         SIAtomicAddrSpace::NONE)
+      return enableSC0Bit(MI) | enableSC1Bit(MI);
+    return false;
----------------
jmmartinez wrote:
> NIT: Is the use of the bitwise or " | " intended? I'd use the logical or " || " instead.
It is intentional, we need both SC0 and SC1 bits set. If I switch this to || it will short circuit and not invoke enableSC1Bit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149986



More information about the cfe-commits mailing list