2009-09-09 07:54:48 +08:00
|
|
|
; RUN: llc < %s -march=x86-64 | FileCheck %s
|
2008-08-20 07:09:18 +08:00
|
|
|
|
|
|
|
@var = external global i64 ; <i64*> [#uses=1]
|
|
|
|
|
|
|
|
define i32 @main() nounwind {
|
|
|
|
entry:
|
2009-07-30 16:33:02 +08:00
|
|
|
; CHECK: main:
|
|
|
|
; CHECK: lock
|
|
|
|
; CHECK: decq
|
2008-08-20 07:09:18 +08:00
|
|
|
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
|