bolt/deps/llvm-18.1.8/clang/test/CodeGen/2010-01-13-MemBarrier.c

10 lines
261 B
C
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
typedef unsigned __INT32_TYPE__ uint32_t;
unsigned t(uint32_t *ptr, uint32_t val) {
// CHECK: @t
// CHECK: atomicrmw xchg ptr {{.*}} seq_cst, align 4
return __sync_lock_test_and_set(ptr, val);
}