Zoran Jovanovic | 2f6845b | 2016-04-13 16:02:25 +0000 | [diff] [blame] | 1 | ; RUN: llc -O0 -march=mipsel -mcpu=mips32r2 -target-abi=o32 < %s -filetype=asm -o - \ |
Daniel Sanders | 0d97270 | 2016-06-24 12:23:17 +0000 | [diff] [blame] | 2 | ; RUN: | FileCheck -check-prefixes=PTR32,ALL %s |
Zoran Jovanovic | 2f6845b | 2016-04-13 16:02:25 +0000 | [diff] [blame] | 3 | ; RUN: llc -O0 -march=mips64el -mcpu=mips64r2 -target-abi=n32 < %s -filetype=asm -o - \ |
Daniel Sanders | 0d97270 | 2016-06-24 12:23:17 +0000 | [diff] [blame] | 4 | ; RUN: | FileCheck -check-prefixes=PTR32,ALL %s |
Zoran Jovanovic | 2f6845b | 2016-04-13 16:02:25 +0000 | [diff] [blame] | 5 | ; RUN: llc -O0 -march=mips64el -mcpu=mips64r2 -target-abi=n64 < %s -filetype=asm -o - \ |
Daniel Sanders | 0d97270 | 2016-06-24 12:23:17 +0000 | [diff] [blame] | 6 | ; RUN: | FileCheck -check-prefixes=PTR64,ALL %s |
Zoran Jovanovic | 2f6845b | 2016-04-13 16:02:25 +0000 | [diff] [blame] | 7 | |
| 8 | ; PTR32: lw $[[R0:[0-9]+]] |
| 9 | ; PTR64: ld $[[R0:[0-9]+]] |
| 10 | |
Simon Dardis | 7577ce2 | 2017-03-09 14:03:26 +0000 | [diff] [blame] | 11 | ; ALL: ll ${{[0-9]+}}, 0($[[R0]]) |
Zoran Jovanovic | 2f6845b | 2016-04-13 16:02:25 +0000 | [diff] [blame] | 12 | |
Simon Dardis | 7577ce2 | 2017-03-09 14:03:26 +0000 | [diff] [blame] | 13 | define {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 Jovanovic | 2f6845b | 2016-04-13 16:02:25 +0000 | [diff] [blame] | 15 | ret {i16, i1} %res |
| 16 | } |
| 17 | |