mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
Indent stuff properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61396 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2321858c8c
commit
1bfe237d69
@ -1343,19 +1343,19 @@ void SelectionDAGLowering::visitJumpTable(JumpTable &JT) {
|
||||
/// in the JumpTable from switch case.
|
||||
void SelectionDAGLowering::visitJumpTableHeader(JumpTable &JT,
|
||||
JumpTableHeader &JTH) {
|
||||
// Subtract the lowest switch case value from the value being switched on
|
||||
// and conditional branch to default mbb if the result is greater than the
|
||||
// Subtract the lowest switch case value from the value being switched on and
|
||||
// conditional branch to default mbb if the result is greater than the
|
||||
// difference between smallest and largest cases.
|
||||
SDValue SwitchOp = getValue(JTH.SValue);
|
||||
MVT VT = SwitchOp.getValueType();
|
||||
SDValue SUB = DAG.getNode(ISD::SUB, VT, SwitchOp,
|
||||
DAG.getConstant(JTH.First, VT));
|
||||
|
||||
// The SDNode we just created, which holds the value being switched on
|
||||
// minus the the smallest case value, needs to be copied to a virtual
|
||||
// register so it can be used as an index into the jump table in a
|
||||
// subsequent basic block. This value may be smaller or larger than the
|
||||
// target's pointer type, and therefore require extension or truncating.
|
||||
// The SDNode we just created, which holds the value being switched on minus
|
||||
// the the smallest case value, needs to be copied to a virtual register so it
|
||||
// can be used as an index into the jump table in a subsequent basic block.
|
||||
// This value may be smaller or larger than the target's pointer type, and
|
||||
// therefore require extension or truncating.
|
||||
if (VT.bitsGT(TLI.getPointerTy()))
|
||||
SwitchOp = DAG.getNode(ISD::TRUNCATE, TLI.getPointerTy(), SUB);
|
||||
else
|
||||
@ -1365,9 +1365,9 @@ void SelectionDAGLowering::visitJumpTableHeader(JumpTable &JT,
|
||||
SDValue CopyTo = DAG.getCopyToReg(getControlRoot(), JumpTableReg, SwitchOp);
|
||||
JT.Reg = JumpTableReg;
|
||||
|
||||
// Emit the range check for the jump table, and branch to the default
|
||||
// block for the switch statement if the value being switched on exceeds
|
||||
// the largest case in the switch.
|
||||
// Emit the range check for the jump table, and branch to the default block
|
||||
// for the switch statement if the value being switched on exceeds the largest
|
||||
// case in the switch.
|
||||
SDValue CMP = DAG.getSetCC(TLI.getSetCCResultType(SUB), SUB,
|
||||
DAG.getConstant(JTH.Last-JTH.First,VT),
|
||||
ISD::SETUGT);
|
||||
|
Loading…
Reference in New Issue
Block a user