Don't bother using max here.
authorChris Lattner <sabre@nondot.org>
Mon, 17 Jan 2005 23:02:13 +0000 (23:02 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 17 Jan 2005 23:02:13 +0000 (23:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19647 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelPattern.cpp

index a75854e5592787c1953ec46fcf45f3c1523393c1..8532b428bbba46dd80baf2120948b90c72c800f4 100644 (file)
@@ -457,7 +457,7 @@ unsigned ISel::ComputeRegPressure(SDOperand O) {
     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";