[llvm] [mlir] [LLVM] Precise error message for intrinsic signature verification (2/n) (PR #199217)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 20:55:32 PDT 2026


================
@@ -1025,35 +1029,42 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
     return false;
   }
 
-  case IITDescriptor::Overloaded:
-    // If this is the second occurrence of an argument,
-    // verify that the later instance matches the previous instance.
-    if (D.getOverloadIndex() < OverloadTys.size())
-      return Ty != OverloadTys[D.getOverloadIndex()];
-
-    if (D.getOverloadIndex() > OverloadTys.size() ||
-        D.getOverloadKind() == IITDescriptor::AK_MatchType)
-      return IsDeferredCheck || DeferCheck(Ty);
+  case IITDescriptor::Overloaded: {
+    unsigned OIdx = D.getOverloadIndex();
+    if (D.getOverloadKind() == IITDescriptor::AK_MatchType) {
+      // This is a dependent type instance, check it similar to other dependent
----------------
jurahul wrote:

Done.

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


More information about the llvm-commits mailing list