[llvm] [RFC][CodeGen] Add generic target feature checks for intrinsics (PR #201470)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 05:07:36 PDT 2026
================
@@ -773,6 +778,14 @@ class MSBuiltin<string name> {
string MSBuiltinName = name;
}
+/// RequiresTargetFeatures - If this intrinsic requires target features,
+/// this specifies the required feature expression using feature names from the
+/// target's subtarget feature table. The expression grammar matches Clang
+/// builtins: comma means AND, | means OR, and parentheses group expressions.
+class RequiresTargetFeatures<string features> {
+ string TargetFeatures = features;
----------------
shiltian wrote:
> What about expressing if an overloadable intrinsic supports a specific type only with a feature?
Hmm, good question. This would not be supported by this. I need to think about it.
https://github.com/llvm/llvm-project/pull/201470
More information about the llvm-commits
mailing list