aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-02-26 10:53:30 +0000
committerBill Wendling <isanbard@gmail.com>2008-02-26 10:53:30 +0000
commit587c01d67411ad9fabbfa81eb8a06b304ffbf396 (patch)
tree4ba79f65c9e99c10eefbae667dbaead30c8c6a1b /lib/Transforms
parentf059deb8dd420b611c8b1a6d70720baf3ea19d51 (diff)
downloadexternal_llvm-587c01d67411ad9fabbfa81eb8a06b304ffbf396.zip
external_llvm-587c01d67411ad9fabbfa81eb8a06b304ffbf396.tar.gz
external_llvm-587c01d67411ad9fabbfa81eb8a06b304ffbf396.tar.bz2
De-tabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp44
-rw-r--r--lib/Transforms/Scalar/PredicateSimplifier.cpp4
2 files changed, 24 insertions, 24 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index ffa45c4..1614d23 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -2163,10 +2163,10 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
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 @@ Instruction *InstCombiner::visitFreeInst(FreeInst &FI) {
/// 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 @@ static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI,
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);
}
}
}
diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp
index d0067b3..42ffc0e 100644
--- a/lib/Transforms/Scalar/PredicateSimplifier.cpp
+++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp
@@ -717,7 +717,7 @@ namespace {
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 @@ namespace {
}
if (K == B) break;
}
- }
+ }
// Insert new edge at Subtree if it isn't already there.
if (I == E || I->To != n || Subtree != I->Subtree)