mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
De-tabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47599 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f059deb8dd
commit
587c01d674
@ -2163,10 +2163,10 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
|
|||||||
match(RHS, m_Mul(m_Value(Y), m_Value(Z)))) {
|
match(RHS, m_Mul(m_Value(Y), m_Value(Z)))) {
|
||||||
if (W != Y) {
|
if (W != Y) {
|
||||||
if (W == Z) {
|
if (W == Z) {
|
||||||
std::swap(Y, Z);
|
std::swap(Y, Z);
|
||||||
} else if (Y == X) {
|
} else if (Y == X) {
|
||||||
std::swap(W, X);
|
std::swap(W, X);
|
||||||
} else if (X == Z) {
|
} else if (X == Z) {
|
||||||
std::swap(Y, Z);
|
std::swap(Y, Z);
|
||||||
std::swap(W, X);
|
std::swap(W, X);
|
||||||
}
|
}
|
||||||
@ -9484,7 +9484,7 @@ Instruction *InstCombiner::visitFreeInst(FreeInst &FI) {
|
|||||||
|
|
||||||
/// InstCombineLoadCast - Fold 'load (cast P)' -> cast (load P)' when possible.
|
/// InstCombineLoadCast - Fold 'load (cast P)' -> cast (load P)' when possible.
|
||||||
static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI,
|
static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI,
|
||||||
const TargetData *TD) {
|
const TargetData *TD) {
|
||||||
User *CI = cast<User>(LI.getOperand(0));
|
User *CI = cast<User>(LI.getOperand(0));
|
||||||
Value *CastOp = CI->getOperand(0);
|
Value *CastOp = CI->getOperand(0);
|
||||||
|
|
||||||
@ -9498,24 +9498,24 @@ static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI,
|
|||||||
unsigned numBits = Ty->getPrimitiveSizeInBits();
|
unsigned numBits = Ty->getPrimitiveSizeInBits();
|
||||||
// Replace LI with immediate integer store.
|
// Replace LI with immediate integer store.
|
||||||
if ((numBits >> 3) == len + 1) {
|
if ((numBits >> 3) == len + 1) {
|
||||||
APInt StrVal(numBits, 0);
|
APInt StrVal(numBits, 0);
|
||||||
APInt SingleChar(numBits, 0);
|
APInt SingleChar(numBits, 0);
|
||||||
if (TD->isLittleEndian()) {
|
if (TD->isLittleEndian()) {
|
||||||
for (signed i = len-1; i >= 0; i--) {
|
for (signed i = len-1; i >= 0; i--) {
|
||||||
SingleChar = (uint64_t) Str[i];
|
SingleChar = (uint64_t) Str[i];
|
||||||
StrVal = (StrVal << 8) | SingleChar;
|
StrVal = (StrVal << 8) | SingleChar;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (unsigned i = 0; i < len; i++) {
|
for (unsigned i = 0; i < len; i++) {
|
||||||
SingleChar = (uint64_t) Str[i];
|
SingleChar = (uint64_t) Str[i];
|
||||||
StrVal = (StrVal << 8) | SingleChar;
|
StrVal = (StrVal << 8) | SingleChar;
|
||||||
}
|
}
|
||||||
// Append NULL at the end.
|
// Append NULL at the end.
|
||||||
SingleChar = 0;
|
SingleChar = 0;
|
||||||
StrVal = (StrVal << 8) | SingleChar;
|
StrVal = (StrVal << 8) | SingleChar;
|
||||||
}
|
}
|
||||||
Value *NL = ConstantInt::get(StrVal);
|
Value *NL = ConstantInt::get(StrVal);
|
||||||
return IC.ReplaceInstUsesWith(LI, NL);
|
return IC.ReplaceInstUsesWith(LI, NL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -717,7 +717,7 @@ namespace {
|
|||||||
|
|
||||||
if (edge.LV == J->LV)
|
if (edge.LV == J->LV)
|
||||||
return; // This update adds nothing new.
|
return; // This update adds nothing new.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (I != B) {
|
if (I != B) {
|
||||||
// We also have to tighten any edge beneath our update.
|
// We also have to tighten any edge beneath our update.
|
||||||
@ -729,7 +729,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
if (K == B) break;
|
if (K == B) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert new edge at Subtree if it isn't already there.
|
// Insert new edge at Subtree if it isn't already there.
|
||||||
if (I == E || I->To != n || Subtree != I->Subtree)
|
if (I == E || I->To != n || Subtree != I->Subtree)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user