[PATCH] D18241: [mips] Fix ATOMIC_CMP_SWAP_WITH_SUCCESS
Simon Dardis via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 06:40:09 PDT 2016
sdardis created this revision.
sdardis added a reviewer: vkalintiris.
sdardis added subscribers: llvm-commits, dsanders.
emitAtomic*PartWord unconditionally sign extend their results causing
failures with __c11_atomic_compare_exchange_strong & co due to an
unsigned value being compared to a sign extended value.
Fix this by using a custom lowering for ATOMIC_CMP_SWAP_WITH_SUCCESS, so that
the cmp operand of the setCC is sign extended as well. Additionally, when
legalizing ATOMIC_CMP_SWAP, don't assume it is a ATOMIC_CMP_SWAP_WITH_SUCCESS.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6982 bytes
Desc: not available
More information about the llvm-commits