[llvm] [AMDGPU] Remove default wavefrontsize attribute in asm parser (PR #97617)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 12:59:47 PDT 2024


================
@@ -1408,7 +1408,20 @@ class AMDGPUAsmParser : public MCTargetAsmParser {
       copySTI().ToggleFeature("southern-islands");
     }
 
-    setAvailableFeatures(ComputeAvailableFeatures(getFeatureBits()));
+    StringRef FS = getSTI().getFeatureString();
+    FeatureBitset FB = getFeatureBits();
+    int isWave32 = FS.contains("+wavefrontsize32");
+    int isWave64 = FS.contains("+wavefrontsize64");
+    // Reset default wavefrontsize features.
+    if (isWave32 + isWave64 == 1) {
+      if (isWave32 && FB[AMDGPU::FeatureWavefrontSize64])
----------------
rampitec wrote:

We can remove FeatureWavefrontSize32 from gfx10 and above, but then we need to add default wavefront size feature everywhere, and we need to parse feature string for this anyway. We are already doing it in clang and flang, but not in any other tools.

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


More information about the llvm-commits mailing list