[llvm-commits] [llvm] r93410 - /llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c
Evan Cheng
evan.cheng at apple.com
Wed Jan 13 18:24:50 PST 2010
Author: evancheng
Date: Wed Jan 13 20:24:50 2010
New Revision: 93410
URL: http://llvm.org/viewvc/llvm-project?rev=93410&view=rev
Log:
Test for r93409.
Added:
llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c
Added: llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c?rev=93410&view=auto
==============================================================================
--- llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c (added)
+++ llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c Wed Jan 13 20:24:50 2010
@@ -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);
+}
More information about the llvm-commits
mailing list