Skip to content

Commit 7009461

Browse files
committed
DAG: Use poison for filler values on legalize error paths
1 parent 2fb2d7e commit 7009461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,7 +2130,7 @@ SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node,
21302130
if (const char *LibcallName = TLI.getLibcallName(LC))
21312131
Callee = DAG.getExternalSymbol(LibcallName, CodePtrTy);
21322132
else {
2133-
Callee = DAG.getUNDEF(CodePtrTy);
2133+
Callee = DAG.getPOISON(CodePtrTy);
21342134
DAG.getContext()->emitError(Twine("no libcall available for ") +
21352135
Node->getOperationName(&DAG));
21362136
}
@@ -4992,7 +4992,7 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) {
49924992
// If the exponent does not match with sizeof(int) a libcall to
49934993
// RTLIB::POWI would use the wrong type for the argument.
49944994
DAG.getContext()->emitError("POWI exponent does not match sizeof(int)");
4995-
Results.push_back(DAG.getUNDEF(Node->getValueType(0)));
4995+
Results.push_back(DAG.getPOISON(Node->getValueType(0)));
49964996
break;
49974997
}
49984998
ExpandFPLibCall(Node, LC, Results);

0 commit comments

Comments
 (0)