llvm-project
93da31b6 - [RFC][CodeGen] Add generic target feature checks for intrinsics (#201470)

Commit
69 days ago
[RFC][CodeGen] Add generic target feature checks for intrinsics (#201470) This PR adds target-independent infrastructure for annotating LLVM intrinsics with required subtarget feature expressions. It introduces a TargetFeatures string field to intrinsic TableGen records. TableGen emits an intrinsic-to-feature mapping table. Both SelectionDAG and GlobalISel now perform this check before lowering target intrinsics. This allows targets to opt in by annotating intrinsic definitions directly, rather than adding custom checks during lowering, legalization, or instruction selection. This PR uses one AMDGPU intrinsic as an example.
Author
Parents
Loading