[llvm] [CodeGen] [AMDGPU] Support type-aware intrinsic feature checks (PR #205536)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 03:05:08 PDT 2026
================
@@ -5530,10 +5530,14 @@ void SelectionDAGBuilder::visitTargetIntrinsic(const CallInst &I,
Intrinsic::ID IntrinsicID = static_cast<Intrinsic::ID>(Intrinsic);
if (!DAG.getMachineFunction().getSubtarget().isIntrinsicSupported(
- Intrinsic)) {
+ Intrinsic, I.getFunctionType())) {
SDLoc DL = getCurSDLoc();
+ StringRef RequiredFeatures = DAG.getMachineFunction()
+ .getSubtarget()
+ .getRequiredTargetFeaturesForIntrinsic(
+ Intrinsic, I.getFunctionType());
DAG.getContext()->diagnose(DiagnosticInfoUnsupportedTargetIntrinsic(
- *I.getFunction(), IntrinsicID, DL.getDebugLoc()));
+ *I.getFunction(), IntrinsicID, DL.getDebugLoc(), RequiredFeatures));
----------------
arsenm wrote:
Ideally the diagnostic would express that the specific type requires the feature
https://github.com/llvm/llvm-project/pull/205536
More information about the llvm-commits
mailing list