diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 8336e1d1f4134..e739659d68561 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2130,7 +2130,7 @@ SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node, if (const char *LibcallName = TLI.getLibcallName(LC)) Callee = DAG.getExternalSymbol(LibcallName, CodePtrTy); else { - Callee = DAG.getUNDEF(CodePtrTy); + Callee = DAG.getPOISON(CodePtrTy); DAG.getContext()->emitError(Twine("no libcall available for ") + Node->getOperationName(&DAG)); } @@ -4992,7 +4992,7 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) { // If the exponent does not match with sizeof(int) a libcall to // RTLIB::POWI would use the wrong type for the argument. DAG.getContext()->emitError("POWI exponent does not match sizeof(int)"); - Results.push_back(DAG.getUNDEF(Node->getValueType(0))); + Results.push_back(DAG.getPOISON(Node->getValueType(0))); break; } ExpandFPLibCall(Node, LC, Results);