[Mlir-commits] [flang] [mlir] [Flang] [OpenMP] atomic compare (PR #184761)

Tom Eccles llvmlistbot at llvm.org
Mon Apr 20 03:15:44 PDT 2026


================
@@ -4630,23 +4635,41 @@ convertOmpAtomicCompare(omp::AtomicCompareOp atomicCompareOp,
         builder.GetInsertBlock()->getModule()->getDataLayout();
     unsigned totalBits =
         DL.getTypeStoreSizeInBits(llvmXElementType).getFixedValue();
+
+    // Reject complex types wider than 128 bits (e.g. COMPLEX(16) would be
+    // i256). Major LLVM backends do not natively support cmpxchg for such
+    // wide integer types, resulting in code having libcall within a lock/mutex.
+    if (totalBits > 128)
----------------
tblah wrote:

Please check for this in `checkImplementationStatus` so that our todo messages can have a consistent format and it is easy for contributors to evaluate what isn't done yet.

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


More information about the Mlir-commits mailing list