1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[SDAG] Clarify the origin of chain in REG_SEQUENCE in comment, NFC

llvm-svn: 349391
This commit is contained in:
Krzysztof Parzyszek 2018-12-17 20:30:20 +00:00
parent 722c971488
commit 58edf152bd

View File

@ -652,7 +652,9 @@ void InstrEmitter::EmitRegSequence(SDNode *Node,
const MCInstrDesc &II = TII->get(TargetOpcode::REG_SEQUENCE); const MCInstrDesc &II = TII->get(TargetOpcode::REG_SEQUENCE);
MachineInstrBuilder MIB = BuildMI(*MF, Node->getDebugLoc(), II, NewVReg); MachineInstrBuilder MIB = BuildMI(*MF, Node->getDebugLoc(), II, NewVReg);
unsigned NumOps = Node->getNumOperands(); unsigned NumOps = Node->getNumOperands();
// REG_SEQUENCE can "inherit" a chain from a subnode. // If the input pattern has a chain, then the root of the corresponding
// output pattern will get a chain as well. This can happen to be a
// REG_SEQUENCE (which is not "guarded" by countOperands/CountResults).
if (NumOps && Node->getOperand(NumOps-1).getValueType() == MVT::Other) if (NumOps && Node->getOperand(NumOps-1).getValueType() == MVT::Other)
--NumOps; // Ignore chain if it exists. --NumOps; // Ignore chain if it exists.