summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86
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
commite479e9643b1cc9c9738bbd3a425240f8adc83ecc (patch)
tree874277dab6eaae78219bf40d39130075cd5e49b4 /llvm/test/CodeGen/X86
parent0cefa51114a1e9cc62a77bd8b64b8ff72d62dc4e (diff)
downloadbcm5719-llvm-e479e9643b1cc9c9738bbd3a425240f8adc83ecc.tar.gz
bcm5719-llvm-e479e9643b1cc9c9738bbd3a425240f8adc83ecc.zip
give LCMPXCHG_DAG[8] a memory operand, allowing it to work with addrspace 256/257
llvm-svn: 114508
Diffstat (limited to 'llvm/test/CodeGen/X86')
-rw-r--r--llvm/test/CodeGen/X86/atomic_op.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/atomic_op.ll b/llvm/test/CodeGen/X86/atomic_op.ll
index 677941bc602..72ff97194db 100644
--- a/llvm/test/CodeGen/X86/atomic_op.ll
+++ b/llvm/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
OpenPOWER on IntegriCloud