blob: 981f0983fa4c9ce15c5c06c3c6e65cb18ea8b026 [file] [log] [blame]
Zoran Jovanovic2f6845b2016-04-13 16:02:25 +00001; RUN: llc -O0 -march=mipsel -mcpu=mips32r2 -target-abi=o32 < %s -filetype=asm -o - \
Daniel Sanders0d972702016-06-24 12:23:17 +00002; RUN: | FileCheck -check-prefixes=PTR32,ALL %s
Zoran Jovanovic2f6845b2016-04-13 16:02:25 +00003; RUN: llc -O0 -march=mips64el -mcpu=mips64r2 -target-abi=n32 < %s -filetype=asm -o - \
Daniel Sanders0d972702016-06-24 12:23:17 +00004; RUN: | FileCheck -check-prefixes=PTR32,ALL %s
Zoran Jovanovic2f6845b2016-04-13 16:02:25 +00005; RUN: llc -O0 -march=mips64el -mcpu=mips64r2 -target-abi=n64 < %s -filetype=asm -o - \
Daniel Sanders0d972702016-06-24 12:23:17 +00006; RUN: | FileCheck -check-prefixes=PTR64,ALL %s
Zoran Jovanovic2f6845b2016-04-13 16:02:25 +00007
8; PTR32: lw $[[R0:[0-9]+]]
9; PTR64: ld $[[R0:[0-9]+]]
10
Simon Dardis7577ce22017-03-09 14:03:26 +000011; ALL: ll ${{[0-9]+}}, 0($[[R0]])
Zoran Jovanovic2f6845b2016-04-13 16:02:25 +000012
Simon Dardis7577ce22017-03-09 14:03:26 +000013define {i16, i1} @foo(i16* %addr, i16 signext %r, i16 zeroext %new) {
14 %res = cmpxchg i16* %addr, i16 %r, i16 %new seq_cst seq_cst
Zoran Jovanovic2f6845b2016-04-13 16:02:25 +000015 ret {i16, i1} %res
16}
17