1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Make valgrind happy.

llvm-svn: 150251
This commit is contained in:
Jason W Kim 2012-02-10 16:07:59 +00:00
parent 56c6162a55
commit 99568e0dee

View File

@ -1903,7 +1903,7 @@ bool ARMTargetLowering::isUsedByReturnOnly(SDNode *N) const {
return false;
unsigned NumCopies = 0;
SDNode* Copies[2];
SDNode* Copies[2] = { 0, 0 };
SDNode *Use = *N->use_begin();
if (Use->getOpcode() == ISD::CopyToReg) {
Copies[NumCopies++] = Use;
@ -1938,7 +1938,7 @@ bool ARMTargetLowering::isUsedByReturnOnly(SDNode *N) const {
UI != UE; ++UI) {
if (UI->getOpcode() == ISD::CopyToReg) {
SDNode *Use = *UI;
if (Use == Copies[0] || Use == Copies[1])
if (Use == Copies[0] || ((NumCopies == 2) && (Use == Copies[1])))
continue;
return false;
}