[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:56: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:
> yassingh wrote:
> > 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.
> There's nothing wrong with just checking opcodes where you need to. The IR and MIR aren't structured exactly the same way
> There's nothing wrong with just checking opcodes where you need to. The IR and MIR aren't structured exactly the same way
Okay. I'll get rid of the second predicate, maybe when the divergence revision comes up we can revisit this if that doesn't look right
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