[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

WÁNG Xuěruì via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 02:27:47 PDT 2024


================
@@ -5743,6 +5747,14 @@ LoongArchTargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const {
   }
 
   unsigned Size = AI->getType()->getPrimitiveSizeInBits();
+  if (Subtarget.hasLAMCAS()) {
+    if (AI->getOperation() == AtomicRMWInst::Nand ||
+        (Size < 32 /*&& (AI->getOperation() != AtomicRMWInst::Or &&
----------------
xen0n wrote:

How is this related to code size?

https://github.com/llvm/llvm-project/pull/114189


More information about the cfe-commits mailing list