[llvm] [CodeGen][TLI] Allow targets to custom expand atomic load/stores (PR #154708)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 01:04:41 PDT 2025


================
@@ -262,7 +262,9 @@ class LLVM_ABI TargetLoweringBase {
     LLOnly,  // Expand the (load) instruction into just a load-linked, which has
              // greater atomic guarantees than a normal load.
     CmpXChg, // Expand the instruction into cmpxchg; used by at least X86.
-    MaskedIntrinsic,   // Use a target-specific intrinsic for the LL/SC loop.
+    MaskedIntrinsic, // Use a target-specific intrinsic for the LL/SC loop.
+    XChg, // Expand a store too large to be atomic into a xchg, then re-process
----------------
Pierre-vh wrote:

Shouldn't that be done separately though? This just continues the trend with all the other enum cases.
Do you mean that XChg here becomes "Custom", and "Expand" remains the one for the TLI hook?

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


More information about the llvm-commits mailing list