Lines Matching full:chain
359 /// MoveBelowCallOrigChain - Replace the original chain operand of the call with
360 /// load's chain operand and move load below the call's chain operand.
364 SDValue Chain = OrigChain.getOperand(0);
365 if (Chain.getNode() == Load.getNode())
368 assert(Chain.getOpcode() == ISD::TokenFactor &&
369 "Unexpected chain operand");
370 for (unsigned i = 0, e = Chain.getNumOperands(); i != e; ++i)
371 if (Chain.getOperand(i).getNode() == Load.getNode())
374 Ops.push_back(Chain.getOperand(i));
399 /// chain and the load.
400 static bool isCalleeLoad(SDValue Callee, SDValue &Chain, bool HasCallSeq) {
401 // The transformation is somewhat dangerous if the call's chain was glued to
403 // the chain, this can create a cycle if the load is not folded. So it is
405 if (Callee.getNode() == Chain.getNode() || !Callee.hasOneUse())
415 while (HasCallSeq && Chain.getOpcode() != ISD::CALLSEQ_START) {
416 if (!Chain.hasOneUse())
418 Chain = Chain.getOperand(0);
421 if (!Chain.getNumOperands())
423 // Since we are not checking for AA here, conservatively abort if the chain
425 if (isa<MemSDNode>(Chain.getNode()) &&
426 cast<MemSDNode>(Chain.getNode())->writeMem())
428 if (Chain.getOperand(0).getNode() == Callee.getNode())
430 if (Chain.getOperand(0).getOpcode() == ISD::TokenFactor &&
431 Callee.getValue(1).isOperandOf(Chain.getOperand(0).getNode()) &&
455 /// [Load chain]
472 SDValue Chain = N->getOperand(0);
474 if (!isCalleeLoad(Load, Chain, HasCallSeq))
476 MoveBelowOrigChain(CurDAG, Load, SDValue(N, 0), Chain);
876 // value is shifted. The input chain may or may not match that, but computing
1340 /// PatternChainNode: this is the matched node that has a chain input and
1492 SDValue Chain = Node->getOperand(0);
1502 const SDValue Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, In2L, In2H, Chain};
1696 SDValue Chain = Node->getOperand(0);
1772 SDValue Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, Chain };
1776 SDValue Ops[] = { Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, Val, Chain };
1847 /// isLoadIncOrDecStore - Check whether or not the chain ending in StoreNode
1888 // Check if the chain is produced by the load or is a TokenFactor with
1889 // the load output chain as an operand. Return InputChain by reference.
1890 SDValue Chain = StoreNode->getChain();
1893 if (Chain == Load.getValue(1)) {
1896 } else if (Chain.getOpcode() == ISD::TokenFactor) {
1898 for (unsigned i = 0, e = Chain.getNumOperands(); i != e; ++i) {
1899 SDValue Op = Chain.getOperand(i);
1905 // Make sure using Op as part of the chain would not cause a cycle here.
1906 // In theory, we could check whether the chain node is a predecessor of
1924 InputChain = CurDAG->getNode(ISD::TokenFactor, Chain.getDebugLoc(),
1955 SDValue Chain = Node->getOperand(0);
1971 Disp, Segment, VMask, Chain};
2263 SDValue Chain;
2272 Chain = SDValue(CNode, 2);
2278 Chain = SDValue(CNode, 0);
2282 // Update the chain.
2283 ReplaceUses(N1.getValue(1), Chain);
2405 SDValue Tmp0, Tmp1, Tmp2, Tmp3, Tmp4, Move, Chain;
2412 Chain = Move.getValue(1);
2413 ReplaceUses(N0.getValue(1), Chain);
2417 Chain = CurDAG->getEntryNode();
2419 Chain = CurDAG->getCopyToReg(Chain, dl, X86::EAX, Move, SDValue());
2420 InFlag = Chain.getValue(1);
2445 // Update the chain.
2635 // Change a chain of {load; incr or dec; store} of the same value into