mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
reduce indentation by using continue, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121662 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -637,48 +637,51 @@ SDValue RegsForValue::getCopyFromRegs(SelectionDAG &DAG,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Chain = P.getValue(1);
|
Chain = P.getValue(1);
|
||||||
|
Parts[i] = P;
|
||||||
|
|
||||||
// If the source register was virtual and if we know something about it,
|
// If the source register was virtual and if we know something about it,
|
||||||
// add an assert node.
|
// add an assert node.
|
||||||
if (TargetRegisterInfo::isVirtualRegister(Regs[Part+i]) &&
|
if (!TargetRegisterInfo::isVirtualRegister(Regs[Part+i]) ||
|
||||||
RegisterVT.isInteger() && !RegisterVT.isVector()) {
|
!RegisterVT.isInteger() || RegisterVT.isVector())
|
||||||
unsigned SlotNo = Regs[Part+i]-TargetRegisterInfo::FirstVirtualRegister;
|
continue;
|
||||||
if (FuncInfo.LiveOutRegInfo.size() > SlotNo) {
|
|
||||||
const FunctionLoweringInfo::LiveOutInfo &LOI =
|
|
||||||
FuncInfo.LiveOutRegInfo[SlotNo];
|
|
||||||
|
|
||||||
unsigned RegSize = RegisterVT.getSizeInBits();
|
unsigned SlotNo = Regs[Part+i]-TargetRegisterInfo::FirstVirtualRegister;
|
||||||
unsigned NumSignBits = LOI.NumSignBits;
|
if (SlotNo >= FuncInfo.LiveOutRegInfo.size()) continue;
|
||||||
unsigned NumZeroBits = LOI.KnownZero.countLeadingOnes();
|
|
||||||
|
|
||||||
// FIXME: We capture more information than the dag can represent. For
|
const FunctionLoweringInfo::LiveOutInfo &LOI =
|
||||||
// now, just use the tightest assertzext/assertsext possible.
|
FuncInfo.LiveOutRegInfo[SlotNo];
|
||||||
bool isSExt = true;
|
|
||||||
EVT FromVT(MVT::Other);
|
|
||||||
if (NumSignBits == RegSize)
|
|
||||||
isSExt = true, FromVT = MVT::i1; // ASSERT SEXT 1
|
|
||||||
else if (NumZeroBits >= RegSize-1)
|
|
||||||
isSExt = false, FromVT = MVT::i1; // ASSERT ZEXT 1
|
|
||||||
else if (NumSignBits > RegSize-8)
|
|
||||||
isSExt = true, FromVT = MVT::i8; // ASSERT SEXT 8
|
|
||||||
else if (NumZeroBits >= RegSize-8)
|
|
||||||
isSExt = false, FromVT = MVT::i8; // ASSERT ZEXT 8
|
|
||||||
else if (NumSignBits > RegSize-16)
|
|
||||||
isSExt = true, FromVT = MVT::i16; // ASSERT SEXT 16
|
|
||||||
else if (NumZeroBits >= RegSize-16)
|
|
||||||
isSExt = false, FromVT = MVT::i16; // ASSERT ZEXT 16
|
|
||||||
else if (NumSignBits > RegSize-32)
|
|
||||||
isSExt = true, FromVT = MVT::i32; // ASSERT SEXT 32
|
|
||||||
else if (NumZeroBits >= RegSize-32)
|
|
||||||
isSExt = false, FromVT = MVT::i32; // ASSERT ZEXT 32
|
|
||||||
|
|
||||||
if (FromVT != MVT::Other)
|
unsigned RegSize = RegisterVT.getSizeInBits();
|
||||||
P = DAG.getNode(isSExt ? ISD::AssertSext : ISD::AssertZext, dl,
|
unsigned NumSignBits = LOI.NumSignBits;
|
||||||
RegisterVT, P, DAG.getValueType(FromVT));
|
unsigned NumZeroBits = LOI.KnownZero.countLeadingOnes();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Parts[i] = P;
|
// FIXME: We capture more information than the dag can represent. For
|
||||||
|
// now, just use the tightest assertzext/assertsext possible.
|
||||||
|
bool isSExt = true;
|
||||||
|
EVT FromVT(MVT::Other);
|
||||||
|
if (NumSignBits == RegSize)
|
||||||
|
isSExt = true, FromVT = MVT::i1; // ASSERT SEXT 1
|
||||||
|
else if (NumZeroBits >= RegSize-1)
|
||||||
|
isSExt = false, FromVT = MVT::i1; // ASSERT ZEXT 1
|
||||||
|
else if (NumSignBits > RegSize-8)
|
||||||
|
isSExt = true, FromVT = MVT::i8; // ASSERT SEXT 8
|
||||||
|
else if (NumZeroBits >= RegSize-8)
|
||||||
|
isSExt = false, FromVT = MVT::i8; // ASSERT ZEXT 8
|
||||||
|
else if (NumSignBits > RegSize-16)
|
||||||
|
isSExt = true, FromVT = MVT::i16; // ASSERT SEXT 16
|
||||||
|
else if (NumZeroBits >= RegSize-16)
|
||||||
|
isSExt = false, FromVT = MVT::i16; // ASSERT ZEXT 16
|
||||||
|
else if (NumSignBits > RegSize-32)
|
||||||
|
isSExt = true, FromVT = MVT::i32; // ASSERT SEXT 32
|
||||||
|
else if (NumZeroBits >= RegSize-32)
|
||||||
|
isSExt = false, FromVT = MVT::i32; // ASSERT ZEXT 32
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Add an assertion node.
|
||||||
|
assert(FromVT != MVT::Other);
|
||||||
|
Parts[i] = DAG.getNode(isSExt ? ISD::AssertSext : ISD::AssertZext, dl,
|
||||||
|
RegisterVT, P, DAG.getValueType(FromVT));
|
||||||
}
|
}
|
||||||
|
|
||||||
Values[Value] = getCopyFromParts(DAG, dl, Parts.begin(),
|
Values[Value] = getCopyFromParts(DAG, dl, Parts.begin(),
|
||||||
|
Reference in New Issue
Block a user