xref: /aosp_15_r20/external/llvm/test/CodeGen/Mips/atomicCmpSwapPW.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -march=mipsel -mcpu=mips32r2 -target-abi=o32 < %s -filetype=asm -o - \
2*9880d681SAndroid Build Coastguard Worker; RUN:   | FileCheck -check-prefixes=PTR32,ALL %s
3*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -march=mips64el -mcpu=mips64r2 -target-abi=n32 < %s -filetype=asm -o - \
4*9880d681SAndroid Build Coastguard Worker; RUN:   | FileCheck  -check-prefixes=PTR32,ALL %s
5*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -march=mips64el -mcpu=mips64r2 -target-abi=n64 < %s -filetype=asm -o - \
6*9880d681SAndroid Build Coastguard Worker; RUN:   | FileCheck -check-prefixes=PTR64,ALL %s
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker; PTR32: lw $[[R0:[0-9]+]]
9*9880d681SAndroid Build Coastguard Worker; PTR64: ld $[[R0:[0-9]+]]
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker; ALL: ll ${{[0-9]+}}, 0($[[R0]])
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerdefine {i16, i1} @foo(i16* %addr, i16 signext %r, i16 zeroext %new) {
14*9880d681SAndroid Build Coastguard Worker  %res = cmpxchg i16* %addr, i16 %r, i16 %new seq_cst seq_cst
15*9880d681SAndroid Build Coastguard Worker  ret {i16, i1} %res
16*9880d681SAndroid Build Coastguard Worker}
17*9880d681SAndroid Build Coastguard Worker
18