1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mcpu=corei7 -march=x86 -verify-machineinstrs | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; 64-bit load/store on x86-32 4*9880d681SAndroid Build Coastguard Worker; FIXME: The generated code can be substantially improved. 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Workerdefine void @test1(i64* %ptr, i64 %val1) { 7*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test1 8*9880d681SAndroid Build Coastguard Worker; CHECK: lock cmpxchg8b 9*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: jne 10*9880d681SAndroid Build Coastguard Worker store atomic i64 %val1, i64* %ptr seq_cst, align 8 11*9880d681SAndroid Build Coastguard Worker ret void 12*9880d681SAndroid Build Coastguard Worker} 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Workerdefine i64 @test2(i64* %ptr) { 15*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test2 16*9880d681SAndroid Build Coastguard Worker; CHECK: lock cmpxchg8b 17*9880d681SAndroid Build Coastguard Worker %val = load atomic i64, i64* %ptr seq_cst, align 8 18*9880d681SAndroid Build Coastguard Worker ret i64 %val 19*9880d681SAndroid Build Coastguard Worker} 20