[llvm] [IR] Reject token overload types in intrinsic signature matching (PR #210799)

Akshay K via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 07:21:10 PDT 2026


================
@@ -1098,6 +1098,11 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
            "Table consistency error");
     OverloadTys.push_back(Ty);
 
+    // Token and label types have no mangling (see getMangledTypeStr), so
+    // they cannot be overload types; reject them with a signature error.
+    if (Ty->isTokenTy() || Ty->isLabelTy())
----------------
kumarak wrote:

You're right, it's unreachable: label is excluded from function signatures by `FunctionType::isValidReturnType`/`isValidArgumentType` and the LLParser, so it never reaches `matchIntrinsicType`. Dropped the label check and kept only the token case. Updated the comment, commit message, and PR title/body to match.

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


More information about the llvm-commits mailing list