[llvm] [CodeGen][AMDGPU] Support custom intrinsic feature checks (PR #205536)

Keshav Vinayak Jha via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 23:00:13 PDT 2026


================
@@ -56,6 +58,21 @@ static cl::opt<unsigned>
 
 GCNSubtarget::~GCNSubtarget() = default;
 
+std::optional<StringRef>
+GCNSubtarget::getCustomRequiredTargetFeaturesForIntrinsic(
----------------
keshavvinayak01 wrote:

I get your point, but that seems broader than the scope of this PR. This change extends the existing target-feature infrastructure specifically for requirements that depend on the resolved intrinsic overload. A call-level hook inspecting arbitrary operands would introduce a general target-specific intrinsic validation API, along with new diagnostic semantics. 

I'll make changes accordingly, but this is a different task altogether. Updated the PR title.

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


More information about the llvm-commits mailing list