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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 12:12:27 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])
----------------
arsenm wrote:

That's also hacky pre-processing of the input features strings, which should also be avoidable. The actual interpretation logic is in ParseSubtargetFeatures

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


More information about the llvm-commits mailing list