[PATCH] D103614: [PowerPC][AIX][RFC] Generate inlined quadword lock free atomic operations via AtomicExpand

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 14:56:08 PDT 2021


efriedma added inline comments.


================
Comment at: llvm/include/llvm/IR/IntrinsicsPowerPC.td:1545
+  def int_ppc_atomicrmw_umax_i128 : AtomicRMW128Intrinsic;
+  def int_ppc_atomicrmw_umin_i128 : AtomicRMW128Intrinsic;
+}
----------------
Adding IR intrinsics for this is a little weird.  Is there any reason you can't just use SelectionDAG custom legalization for these operations?  I mean, not that it doesn't work this way, but it seems more complicated overall.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstr64Bit.td:318
+// Atomic pseudo instructions expanded post-ra.
+def ATOMIC_SWAP_I128 : AtomicRMW128<"#ATOMIC_SWAP_I128">;
+def ATOMIC_LOAD_ADD_I128 : AtomicRMW128<"#ATOMIC_LOAD_ADD_I128">;
----------------
Do you need to specify the size of these instructions somewhere, if you're expanding them after branch relaxation?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103614



More information about the llvm-commits mailing list