From e8f422b9f39af1d2c141c101f8ca95409d708814 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 14 Jan 2010 02:24:50 +0000 Subject: [PATCH] Test for r93409. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93410 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/FrontendC/2010-01-13-MemBarrier.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/FrontendC/2010-01-13-MemBarrier.c diff --git a/test/FrontendC/2010-01-13-MemBarrier.c b/test/FrontendC/2010-01-13-MemBarrier.c new file mode 100644 index 00000000000..53d0081f78e --- /dev/null +++ b/test/FrontendC/2010-01-13-MemBarrier.c @@ -0,0 +1,11 @@ +// RUN: %llvmgcc %s -S -emit-llvm -o - | FileCheck %s +// XFAIL: sparc,powerpc +// rdar://7536390 + +unsigned t(unsigned *ptr, unsigned val) { + // CHECK: @t + // CHECK: call void @llvm.memory.barrier + // CHECK-NEXT: call i32 @llvm.atomic.swap.i32 + // CHECK-NEXT: call void @llvm.memory.barrier + return __sync_lock_test_and_set(ptr, val); +} -- 2.34.1