[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelPattern.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 17 15:02:28 PST 2005



Changes in directory llvm/lib/Target/X86:

X86ISelPattern.cpp updated: 1.66 -> 1.67
---
Log message:

Don't bother using max here.


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

Index: llvm/lib/Target/X86/X86ISelPattern.cpp
diff -u llvm/lib/Target/X86/X86ISelPattern.cpp:1.66 llvm/lib/Target/X86/X86ISelPattern.cpp:1.67
--- llvm/lib/Target/X86/X86ISelPattern.cpp:1.66	Mon Jan 17 16:56:09 2005
+++ llvm/lib/Target/X86/X86ISelPattern.cpp	Mon Jan 17 17:02:13 2005
@@ -457,7 +457,7 @@
     if (O.getOpcode() != ISD::TokenFactor)
       Result = MaxRegUse+NumExtraMaxRegUsers;
     else
-      Result = std::max(MaxRegUse-1, 1);
+      Result = MaxRegUse == 1 ? 0 : MaxRegUse-1;
   }
 
   //std::cerr << " WEIGHT: " << Result << " ";  N->dump(); std::cerr << "\n";






More information about the llvm-commits mailing list