From: Krzysztof Parzyszek Date: Mon, 17 Dec 2018 20:30:20 +0000 (+0000) Subject: [SDAG] Clarify the origin of chain in REG_SEQUENCE in comment, NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bf594e6cafaf7c0955af20e6f064b0601234d93;p=llvm [SDAG] Clarify the origin of chain in REG_SEQUENCE in comment, NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349391 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index da6d973e0b7..6a6114677cc 100644 --- a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -652,7 +652,9 @@ void InstrEmitter::EmitRegSequence(SDNode *Node, const MCInstrDesc &II = TII->get(TargetOpcode::REG_SEQUENCE); MachineInstrBuilder MIB = BuildMI(*MF, Node->getDebugLoc(), II, NewVReg); 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) --NumOps; // Ignore chain if it exists.