[llvm] [SDAG] emit error when `llvm.type.checked.load` is not lowered (PR #208058)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 00:11:58 PDT 2026


================
@@ -7731,6 +7731,16 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
                           "LowerTypeTests pass before code generation");
     return;
 
+  case Intrinsic::type_checked_load:
+  case Intrinsic::type_checked_load_relative:
+    // This likely indicates a misconfiguration where LowerTypeTests did not
+    // run but should have, for instance when devirtualization is enabled
+    // but LTO does not actually run.
+    reportFatalUsageError(
----------------
arsenm wrote:

Probably should use DiagnosticInfo / context error, then you wouldn't need to have a separate file per error condition (you cold also use split-file to keep them in the same test)

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


More information about the llvm-commits mailing list