[llvm] DAG: Gracefully diagnose missing lrint/llrint/lround/llround libcall (PR #215032)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 02:22:52 PDT 2026


================
@@ -4570,11 +4570,21 @@ void DAGTypeLegalizer::ExpandIntRes_XROUND_XRINT(SDNode *N, SDValue &Lo,
 
   EVT RetVT = N->getValueType(0);
 
+  RTLIB::LibcallImpl LCImpl = DAG.getLibcalls().getLibcallImpl(LC);
+  if (LCImpl == RTLIB::Unsupported) {
+    DAG.getContext()->emitError(Twine("no libcall available for ") +
----------------
arsenm wrote:

That would degrade diagnostic quality. Conceptually I want to eliminate calling Libcalls 

https://github.com/llvm/llvm-project/pull/215032


More information about the llvm-commits mailing list