xref: /aosp_15_r20/external/llvm/test/Bitcode/atomic.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %s -o - | llvm-dis | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: verify-uselistorder < %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workerdefine void @test_cmpxchg(i32* %addr, i32 %desired, i32 %new) {
5*9880d681SAndroid Build Coastguard Worker  cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
6*9880d681SAndroid Build Coastguard Worker  ; CHECK: cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker  cmpxchg volatile i32* %addr, i32 %desired, i32 %new seq_cst monotonic
9*9880d681SAndroid Build Coastguard Worker  ; CHECK: cmpxchg volatile i32* %addr, i32 %desired, i32 %new seq_cst monotonic
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker  cmpxchg weak i32* %addr, i32 %desired, i32 %new acq_rel acquire
12*9880d681SAndroid Build Coastguard Worker  ; CHECK: cmpxchg weak i32* %addr, i32 %desired, i32 %new acq_rel acquire
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker  cmpxchg weak volatile i32* %addr, i32 %desired, i32 %new singlethread release monotonic
15*9880d681SAndroid Build Coastguard Worker  ; CHECK: cmpxchg weak volatile i32* %addr, i32 %desired, i32 %new singlethread release monotonic
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker  ret void
18*9880d681SAndroid Build Coastguard Worker}
19