[llvm-commits] [llvm] r47599 - in /llvm/trunk/lib/Transforms/Scalar: InstructionCombining.cpp PredicateSimplifier.cpp

Bill Wendling isanbard at gmail.com
Tue Feb 26 02:53:38 PST 2008


Author: void
Date: Tue Feb 26 04:53:30 2008
New Revision: 47599

URL: http://llvm.org/viewvc/llvm-project?rev=47599&view=rev
Log:
De-tabify.

Modified:
    llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
    llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=47599&r1=47598&r2=47599&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Feb 26 04:53:30 2008
@@ -2163,10 +2163,10 @@
         match(RHS, m_Mul(m_Value(Y), m_Value(Z)))) {
       if (W != Y) {
         if (W == Z) {
-	  std::swap(Y, Z);
+          std::swap(Y, Z);
         } else if (Y == X) {
-	  std::swap(W, X);
-	} else if (X == Z) {
+          std::swap(W, X);
+        } else if (X == Z) {
           std::swap(Y, Z);
           std::swap(W, X);
         }
@@ -9484,7 +9484,7 @@
 
 /// InstCombineLoadCast - Fold 'load (cast P)' -> cast (load P)' when possible.
 static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI,
-					const TargetData *TD) {
+                                        const TargetData *TD) {
   User *CI = cast<User>(LI.getOperand(0));
   Value *CastOp = CI->getOperand(0);
 
@@ -9498,24 +9498,24 @@
       unsigned numBits = Ty->getPrimitiveSizeInBits();
       // Replace LI with immediate integer store.
       if ((numBits >> 3) == len + 1) {
-	APInt StrVal(numBits, 0);
-	APInt SingleChar(numBits, 0);
-	if (TD->isLittleEndian()) {
-	  for (signed i = len-1; i >= 0; i--) {
-	    SingleChar = (uint64_t) Str[i];
-	    StrVal = (StrVal << 8) | SingleChar;
-	  }
-	} else {
-	  for (unsigned i = 0; i < len; i++) {
-	    SingleChar = (uint64_t) Str[i];
-		StrVal = (StrVal << 8) | SingleChar;
-	  }
-	  // Append NULL at the end.
-	  SingleChar = 0;
-	  StrVal = (StrVal << 8) | SingleChar;
-	}
-	Value *NL = ConstantInt::get(StrVal);
-	return IC.ReplaceInstUsesWith(LI, NL);
+        APInt StrVal(numBits, 0);
+        APInt SingleChar(numBits, 0);
+        if (TD->isLittleEndian()) {
+          for (signed i = len-1; i >= 0; i--) {
+            SingleChar = (uint64_t) Str[i];
+            StrVal = (StrVal << 8) | SingleChar;
+          }
+        } else {
+          for (unsigned i = 0; i < len; i++) {
+            SingleChar = (uint64_t) Str[i];
+            StrVal = (StrVal << 8) | SingleChar;
+          }
+          // Append NULL at the end.
+          SingleChar = 0;
+          StrVal = (StrVal << 8) | SingleChar;
+        }
+        Value *NL = ConstantInt::get(StrVal);
+        return IC.ReplaceInstUsesWith(LI, NL);
       }
     }
   }

Modified: llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp?rev=47599&r1=47598&r2=47599&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp Tue Feb 26 04:53:30 2008
@@ -717,7 +717,7 @@
 
           if (edge.LV == J->LV)
             return; // This update adds nothing new.
-	}
+        }
 
         if (I != B) {
           // We also have to tighten any edge beneath our update.
@@ -729,7 +729,7 @@
             }
             if (K == B) break;
           }
-	}
+        }
 
         // Insert new edge at Subtree if it isn't already there.
         if (I == E || I->To != n || Subtree != I->Subtree)





More information about the llvm-commits mailing list