[PATCH] D136525: [M68k] Add codegen pattern for atomic load / store

Sheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 03:22:15 PDT 2022


0x59616e added inline comments.


================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:176
   return Alignment >= Size &&
-         Size <= TLI->getMaxAtomicSizeInBitsSupported() / 8;
+         Size <= TLI->getMaxAtomicSizeInBitsSupported(I) / 8;
 }
----------------
myhsu wrote:
> myhsu wrote:
> > I think you tried to turn every atomic operations but atomic_load / store / cmpxchg into libcall here. But even we don't turn them into libcalls in this pass, we still can do that during legalization by marking the corresponding SDNode as Expand or LibCall, right?
> *corresponding operation as Expand or LibCall
I'll look into it.


================
Comment at: llvm/lib/Target/M68k/M68kInstrAtomics.td:27
+
+multiclass AtomicPatterns {
+  foreach size = [8, 16, 32] in {
----------------
myhsu wrote:
> Why do we need to wrap these patterns with multiclass?
Yeah that's verbose. I didn't think this through.


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

https://reviews.llvm.org/D136525



More information about the llvm-commits mailing list