[llvm] [RFC][CodeGen] Add generic target feature checks for intrinsics (PR #201470)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 01:53:32 PDT 2026


================
@@ -2857,6 +2867,13 @@ bool IRTranslator::translateCall(const User &U, MachineIRBuilder &MIRBuilder) {
 
   assert(ID != Intrinsic::not_intrinsic && "unknown intrinsic");
 
+  if (!MF->getSubtarget().isIntrinsicSupported(ID)) {
+    const Function &Fn = MF->getFunction();
+    Fn.getContext().diagnose(DiagnosticInfoUnsupported(
----------------
arsenm wrote:

Probably should have a dedicated DiagnosticInfo type for this 

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


More information about the llvm-commits mailing list