[PATCH] D134266: Introduce predicate for a atomic operations in GMIR

Yashwant Singh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 06:51:37 PDT 2022


yassingh added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetInstrInfo.h:118-121
+  static bool isGenericAtomicCmpXchgOpcode(unsigned Opc){
+    return Opc == TargetOpcode::G_ATOMIC_CMPXCHG ||
+            Opc == TargetOpcode::G_ATOMIC_CMPXCHG_WITH_SUCCESS;
+  }
----------------
arsenm wrote:
> I think the benefit of this one is dubious. They don't have the same operand structure
We need this to check divergence of an instruction in GMIR, it was either this or moving this opcode matching inside isDivergent type function which didn't look right and also wasn't consistent with how Atomic instructions are handled in IR divergence/uniformity analysis. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134266



More information about the llvm-commits mailing list