1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/test/CodeGen/Mips/atomicCmpSwapPW.ll
Simon Dardis 5556ec2bac [mips] Revert fixes for PR32020.
The fix introduces segfaults and clobbers the value to be stored when
the atomic sequence loops.

Revert "[Target/MIPS] Kill dead code, no functional change intended."

This reverts commit r296153.

Revert "Recommit "[mips] Fix atomic compare and swap at O0.""

This reverts commit r296134.

llvm-svn: 297380
2017-03-09 14:03:26 +00:00

18 lines
660 B
LLVM

; RUN: llc -O0 -march=mipsel -mcpu=mips32r2 -target-abi=o32 < %s -filetype=asm -o - \
; RUN: | FileCheck -check-prefixes=PTR32,ALL %s
; RUN: llc -O0 -march=mips64el -mcpu=mips64r2 -target-abi=n32 < %s -filetype=asm -o - \
; RUN: | FileCheck -check-prefixes=PTR32,ALL %s
; RUN: llc -O0 -march=mips64el -mcpu=mips64r2 -target-abi=n64 < %s -filetype=asm -o - \
; RUN: | FileCheck -check-prefixes=PTR64,ALL %s
; PTR32: lw $[[R0:[0-9]+]]
; PTR64: ld $[[R0:[0-9]+]]
; ALL: ll ${{[0-9]+}}, 0($[[R0]])
define {i16, i1} @foo(i16* %addr, i16 signext %r, i16 zeroext %new) {
%res = cmpxchg i16* %addr, i16 %r, i16 %new seq_cst seq_cst
ret {i16, i1} %res
}