diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 35aa7b87bc3b7..7637b15824e3a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2329,19 +2329,6 @@ void SelectionDAGISel::SelectInlineAsmMemoryOperands(std::vector &Ops, Ops.push_back(handle.getValue()); } -/// findGlueUse - Return use of MVT::Glue value produced by the specified -/// SDNode. -/// -static SDNode *findGlueUse(SDNode *N) { - unsigned FlagResNo = N->getNumValues()-1; - for (SDNode::use_iterator I = N->use_begin(), E = N->use_end(); I != E; ++I) { - SDUse &Use = I.getUse(); - if (Use.getResNo() == FlagResNo) - return Use.getUser(); - } - return nullptr; -} - /// findNonImmUse - Return true if "Def" is a predecessor of "Root" via a path /// beyond "ImmedUse". We may ignore chains as they are checked separately. static bool findNonImmUse(SDNode *Root, SDNode *Def, SDNode *ImmedUse, @@ -2445,7 +2432,7 @@ bool SelectionDAGISel::IsLegalToFold(SDValue N, SDNode *U, SDNode *Root, // glueged set. EVT VT = Root->getValueType(Root->getNumValues()-1); while (VT == MVT::Glue) { - SDNode *GU = findGlueUse(Root); + SDNode *GU = Root->getGluedUser(); if (!GU) break; Root = GU;