[llvm] RFC: [AMDGPU] Check subtarget features for consistency (PR #86957)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 00:23:52 PDT 2024


================
@@ -165,6 +166,14 @@ GCNSubtarget::initializeSubtargetDependencies(const Triple &TT,
   return *this;
 }
 
+void GCNSubtarget::checkSubtargetFeatures(const Function &F) const {
+  if (hasFeature(AMDGPU::FeatureWavefrontSize32) ==
+      hasFeature(AMDGPU::FeatureWavefrontSize64)) {
+    F.getContext().diagnose(DiagnosticInfoUnsupported(
----------------
Pierre-vh wrote:

tiny tiny nit: put `F.getContext()` in a variable?

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


More information about the llvm-commits mailing list