================
@@ -758,6 +758,14 @@ class TypeInfoGen<list<LLVMType> RetTypes, list<LLVMType> 
ParamTypes> {
 //  * ParamTypes is a list containing the parameter types expected for the
 //    intrinsic.
 //  * Properties can be set to describe the behavior of the intrinsic.
+//  * TargetFeatures is a target feature expression required by the intrinsic.
+//    The empty string means no target features are required. The expression
+//    uses feature names from the target's subtarget feature table. Comma means
+//    AND, | means OR, and parentheses group expressions. The special value
+//    "$custom" (Intrinsic::CustomTargetFeatures) indicates that support is
+//    decided by a target hook 
(TargetSubtargetInfo::isIntrinsicSupportedByTarget)
+//    rather than by evaluating a feature expression; use it when support 
depends
+//    on more than the subtarget features, e.g. a particular overload/mangling.
----------------
shiltian wrote:

Because verifier cannot be sub target dependent. I can think of two cases:

1) An intrinsic's argument is subtarget dependent. Say it accepts 0 and 1 on 
one subtarget, but can accept 0, 1 and 2 on another subtarget. The verifier can 
only check if the value is 0/1/2, but if the value is 2 on the target that 
doesn't accept that, we can't select it. I think we already have that kind of 
intrinsics for memory operations where there is an argument for some kind of 
controls.

2) Certain manglings of an intrinsic is sub target dependent. This is also not 
something that can be done by the verifier.

Overall, I think anything that is sub target dependent would fit this, because 
they can neither be verified by the verifier or be correctly selected.

https://github.com/llvm/llvm-project/pull/201470
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to