================
@@ -87,6 +89,10 @@ class LLVM_ABI TargetSubtargetInfo : public MCSubtargetInfo {
 
   virtual bool isXRaySupported() const { return false; }
 
+  /// \returns true if the target intrinsic \p IntrinsicID used by \p CB is
+  /// supported by this subtarget.
+  bool isIntrinsicSupported(unsigned IntrinsicID, const CallBase &CB) const;
----------------
arsenm wrote:

> I'm thinking about the case where an intrinsic might only be allowed in 
> certain functions, like certain calling conventions, but I can see the 
> argument that this would need to be captured by verifier, probably.

This sounds like a rule that shouldn't exist. If it would, it probably should 
be UB rather than treated as invalid IR

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