summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-21 23:59:42 +0000
committerChris Lattner <sabre@nondot.org>2010-09-21 23:59:42 +0000
commit93c4a5bef780e43552d3b9d702756d3acb7801d2 (patch)
tree0cbf83e42941a89a171a4340241ce8842177479d /test
parentb72d53d8efb51f7d8a22ff8753a8286071dc5f06 (diff)
downloadllvm-93c4a5bef780e43552d3b9d702756d3acb7801d2.tar.gz
llvm-93c4a5bef780e43552d3b9d702756d3acb7801d2.tar.bz2
llvm-93c4a5bef780e43552d3b9d702756d3acb7801d2.tar.xz
give LCMPXCHG_DAG[8] a memory operand, allowing it to work with addrspace 256/257
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/atomic_op.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/X86/atomic_op.ll b/test/CodeGen/X86/atomic_op.ll
index 677941bc60..72ff97194d 100644
--- a/test/CodeGen/X86/atomic_op.ll
+++ b/test/CodeGen/X86/atomic_op.ll
@@ -109,6 +109,17 @@ entry:
ret void
}
+define void @test2(i32 addrspace(256)* nocapture %P) nounwind {
+entry:
+; CHECK: lock
+; CEHCK: cmpxchgl %{{.*}}, %gs:(%{{.*}})
+
+ %0 = tail call i32 @llvm.atomic.cmp.swap.i32.p256i32(i32 addrspace(256)* %P, i32 0, i32 1)
+ ret void
+}
+
+declare i32 @llvm.atomic.cmp.swap.i32.p256i32(i32 addrspace(256)* nocapture, i32, i32) nounwind
+
declare i32 @llvm.atomic.load.add.i32.p0i32(i32*, i32) nounwind
declare i32 @llvm.atomic.load.sub.i32.p0i32(i32*, i32) nounwind