Fixed some bugs.
[llvm/zpu.git] / test / FrontendC / 2010-01-13-MemBarrier.c
blob8fcd5228781eb7c3cdf1f660967c1ca719547522
1 // RUN: %llvmgcc %s -S -emit-llvm -o - | FileCheck %s
2 // XFAIL: sparc
3 // rdar://7536390
5 unsigned t(unsigned *ptr, unsigned val) {
6 // CHECK: @t
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);