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