[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 11:55:14 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:
We shouldn't really be directly checking the bits. The + and -s are sequentially evaluated in the subtarget construction to set the WavefrontSize field. I would expect the same to happen down in MC. I don't know why the subtarget evaluation logic isn't an an MCSubtarget superclass
https://github.com/llvm/llvm-project/pull/97617
More information about the llvm-commits
mailing list