2017-08-02 08:28:10 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-- -verify-machineinstrs | FileCheck %s
|
2011-06-30 08:48:30 +08:00
|
|
|
|
|
|
|
; rdar://9692967
|
|
|
|
|
2011-07-02 07:04:38 +08:00
|
|
|
define void @t1(i64* %p, i32 %b) nounwind {
|
2011-06-30 08:48:30 +08:00
|
|
|
entry:
|
|
|
|
%p.addr = alloca i64*, align 8
|
|
|
|
store i64* %p, i64** %p.addr, align 8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp = load i64*, i64** %p.addr, align 8
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: t1:
|
2011-07-02 07:04:38 +08:00
|
|
|
; CHECK: movl $2147483648, %eax
|
2015-05-27 02:35:10 +08:00
|
|
|
; CHECK: lock orq %r{{.*}}, (%r{{.*}})
|
2011-09-27 07:15:09 +08:00
|
|
|
%0 = atomicrmw or i64* %tmp, i64 2147483648 seq_cst
|
2011-06-30 08:48:30 +08:00
|
|
|
ret void
|
|
|
|
}
|
2011-07-02 07:04:38 +08:00
|
|
|
|
|
|
|
define void @t2(i64* %p, i32 %b) nounwind {
|
|
|
|
entry:
|
|
|
|
%p.addr = alloca i64*, align 8
|
|
|
|
store i64* %p, i64** %p.addr, align 8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp = load i64*, i64** %p.addr, align 8
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: t2:
|
2015-05-27 02:35:10 +08:00
|
|
|
; CHECK: lock orq $2147483644, (%r{{.*}})
|
2011-09-27 07:15:09 +08:00
|
|
|
%0 = atomicrmw or i64* %tmp, i64 2147483644 seq_cst
|
2011-07-02 07:04:38 +08:00
|
|
|
ret void
|
|
|
|
}
|