[llvm] [SPIRV] Support atomic exchange of pointers (PR #207830)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 01:19:05 PDT 2026


================
@@ -2444,6 +2444,71 @@ bool SPIRVInstructionSelector::selectAtomicRMW(Register ResVReg,
     ValueReg = TmpReg;
   }
 
+  if (ResType.isTypePtr()) {
+    if (NewOpcode != SPIRV::OpAtomicExchange)
+      return diagnoseUnsupported(
+          I, "Lowering to SPIR-V of this atomic operation is not "
----------------
aobolensk wrote:

Let's guard it with error (current behavior). I think that is ok

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


More information about the llvm-commits mailing list