2014-07-02 02:53:31 +08:00
|
|
|
; RUN: llc < %s -mcpu=corei7 -march=x86 -verify-machineinstrs | FileCheck %s
|
2011-08-25 06:33:28 +08:00
|
|
|
|
|
|
|
; 64-bit load/store on x86-32
|
|
|
|
; FIXME: The generated code can be substantially improved.
|
|
|
|
|
|
|
|
define void @test1(i64* %ptr, i64 %val1) {
|
|
|
|
; CHECK: test1
|
|
|
|
; CHECK: cmpxchg8b
|
|
|
|
; CHECK-NEXT: jne
|
2011-09-14 04:50:54 +08:00
|
|
|
store atomic i64 %val1, i64* %ptr seq_cst, align 8
|
2011-08-25 06:33:28 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @test2(i64* %ptr) {
|
|
|
|
; CHECK: test2
|
|
|
|
; CHECK: cmpxchg8b
|
2011-09-14 04:50:54 +08:00
|
|
|
%val = load atomic i64* %ptr seq_cst, align 8
|
2011-08-25 06:33:28 +08:00
|
|
|
ret i64 %val
|
|
|
|
}
|