From e479e9643b1cc9c9738bbd3a425240f8adc83ecc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 21 Sep 2010 23:59:42 +0000 Subject: give LCMPXCHG_DAG[8] a memory operand, allowing it to work with addrspace 256/257 llvm-svn: 114508 --- llvm/test/CodeGen/X86/atomic_op.ll | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'llvm/test/CodeGen/X86') 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 -- cgit v1.2.3