[PATCH] D134266: Introduce predicate for a atomic operations in GMIR
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 06:52:36 PDT 2022
arsenm 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;
+ }
----------------
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
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