From c7f4841769bb92a20e16564ff6918992dd75e1f2 Mon Sep 17 00:00:00 2001 From: Jason W Kim Date: Fri, 10 Feb 2012 16:07:59 +0000 Subject: Make valgrind happy. llvm-svn: 150251 --- llvm/lib/Target/ARM/ARMISelLowering.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp') diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index 227ef3d094f..b7df378f05f 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -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; } -- cgit v1.2.3