blob: a9ebfef2ebeb1326e1aedcae9f1e15d761318ae2 [file] [log] [blame]
Eli Friedman9c73a572011-08-24 22:33:28 +00001; RUN: llc < %s -march=x86 | FileCheck %s
2
3; 64-bit load/store on x86-32
4; FIXME: The generated code can be substantially improved.
5
6define void @test1(i64* %ptr, i64 %val1) {
7; CHECK: test1
8; CHECK: cmpxchg8b
9; CHECK-NEXT: jne
Eli Friedmanf1518212011-09-13 20:50:54 +000010 store atomic i64 %val1, i64* %ptr seq_cst, align 8
Eli Friedman9c73a572011-08-24 22:33:28 +000011 ret void
12}
13
14define i64 @test2(i64* %ptr) {
15; CHECK: test2
16; CHECK: cmpxchg8b
Eli Friedmanf1518212011-09-13 20:50:54 +000017 %val = load atomic i64* %ptr seq_cst, align 8
Eli Friedman9c73a572011-08-24 22:33:28 +000018 ret i64 %val
19}