[llvm-commits] [llvm] r150251 - /llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Jason W Kim jason.w.kim.2009 at gmail.com
Fri Feb 10 08:07:59 PST 2012


Author: jasonwkim
Date: Fri Feb 10 10:07:59 2012
New Revision: 150251

URL: http://llvm.org/viewvc/llvm-project?rev=150251&view=rev
Log:
Make valgrind happy.

Modified:
    llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=150251&r1=150250&r2=150251&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Fri Feb 10 10:07:59 2012
@@ -1903,7 +1903,7 @@
     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 @@
          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;
       }





More information about the llvm-commits mailing list