1 // RUN: %llvmgcc %s -S -emit-llvm -o - | FileCheck %s
5 unsigned t(unsigned *ptr
, unsigned val
) {
7 // CHECK: call void @llvm.memory.barrier
8 // CHECK-NEXT: call i32 @llvm.atomic.swap.i32
9 // CHECK-NEXT: call void @llvm.memory.barrier
10 return __sync_lock_test_and_set(ptr
, val
);