[clang] [clang] allow fetch_{min, max} for atomic pointer types (PR #182699)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 13 15:47:15 PDT 2026


================
@@ -747,9 +747,13 @@ void test_c11_minmax(_Atomic(int) * si, _Atomic(unsigned) * ui, _Atomic(short) *
   // CHECK: atomicrmw min ptr {{.*}} acquire, align 8
   *sll = __c11_atomic_fetch_min(sll, 42, memory_order_acquire);
 
+  // CHECK: atomicrmw umax ptr {{.*}} acquire, align 4
+  __c11_atomic_fetch_max(aip, ip, memory_order_acquire);
----------------
Artem-B wrote:

Do we want to save the result value somewhere? 

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


More information about the cfe-commits mailing list