1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/CodeGen/X86/2008-08-19-SubAndFetch.ll
Bill Wendling ab7c8c091e Add support for the __sync_sub_and_fetch atomics and friends for X86. The code
was already present, but not hooked up to anything.

llvm-svn: 55018
2008-08-19 23:09:18 +00:00

12 lines
306 B
LLVM

; RUN: llvm-as < %s | llc -march=x86-64 | grep xadd
@var = external global i64 ; <i64*> [#uses=1]
define i32 @main() nounwind {
entry:
tail call i64 @llvm.atomic.load.sub.i64.p0i64( i64* @var, i64 1 ) ; <i64>:0 [#uses=0]
unreachable
}
declare i64 @llvm.atomic.load.sub.i64.p0i64(i64*, i64) nounwind