[llvm-commits] CVS: llvm/lib/CodeGen/RegisterScavenging.cpp

Evan Cheng evan.cheng at apple.com
Mon Apr 2 23:43:46 PDT 2007



Changes in directory llvm/lib/CodeGen:

RegisterScavenging.cpp updated: 1.14 -> 1.15
---
Log message:

Bad bad bug. findRegisterUseOperand() returns -1 if a use if not found.

---
Diffs of the changes:  (+1 -1)

 RegisterScavenging.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/CodeGen/RegisterScavenging.cpp
diff -u llvm/lib/CodeGen/RegisterScavenging.cpp:1.14 llvm/lib/CodeGen/RegisterScavenging.cpp:1.15
--- llvm/lib/CodeGen/RegisterScavenging.cpp:1.14	Mon Mar 26 17:23:54 2007
+++ llvm/lib/CodeGen/RegisterScavenging.cpp	Tue Apr  3 01:43:29 2007
@@ -235,7 +235,7 @@
   I = next(I);
   while (I != MBB->end()) {
     Dist++;
-    if (I->findRegisterUseOperand(Reg))
+    if (I->findRegisterUseOperand(Reg) != -1)
         return Dist;
     I = next(I);    
   }






More information about the llvm-commits mailing list