OSDN Git Service

[PowerPC] Zero-extend the compare operand for ATOMIC_CMP_SWAP
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Fri, 12 Jan 2018 14:58:41 +0000 (14:58 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Fri, 12 Jan 2018 14:58:41 +0000 (14:58 +0000)
commit509fe161ac24120bc1b649e67e828698dff385f7
treedee089353c68a81af87bd81b3fc760b8db0824c6
parentbef5f248b85fb47702bd94a11276728a4cb4689f
[PowerPC] Zero-extend the compare operand for ATOMIC_CMP_SWAP

Part of the fix for https://bugs.llvm.org/show_bug.cgi?id=35812.
This patch ensures that the compare operand for the atomic compare and swap
is properly zero-extended to 32 bits if applicable.
A follow-up commit will fix the extension for the SETCC node generated when
expanding an ATOMIC_CMP_SWAP_WITH_SUCCESS. That will complete the bug fix.

Differential Revision: https://reviews.llvm.org/D41856

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322372 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
lib/Target/PowerPC/PPCInstrInfo.td
test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll [new file with mode: 0644]
test/CodeGen/PowerPC/atomics-regression.ll