mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-26 22:42:46 +02:00
68c567a38a
The syntax for "cmpxchg" should now look something like: cmpxchg i32* %addr, i32 42, i32 3 acquire monotonic where the second ordering argument gives the required semantics in the case that no exchange takes place. It should be no stronger than the first ordering constraint and cannot be either "release" or "acq_rel" (since no store will have taken place). rdar://problem/15996804 llvm-svn: 203559
14 lines
331 B
LLVM
14 lines
331 B
LLVM
; RUN: llc < %s -march=x86-64 -mcpu=core2 | FileCheck %s
|
|
|
|
; Basic 128-bit cmpxchg
|
|
define void @t1(i128* nocapture %p) nounwind ssp {
|
|
entry:
|
|
; CHECK: movl $1, %ebx
|
|
; CHECK: lock
|
|
; CHECK-NEXT: cmpxchg16b
|
|
%r = cmpxchg i128* %p, i128 0, i128 1 seq_cst seq_cst
|
|
ret void
|
|
}
|
|
|
|
; FIXME: Handle 128-bit atomicrmw/load atomic/store atomic
|