-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[AMDGPU] Remove wavefrontsize feature from GFX10+ #98400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
ac6a483
55dda8d
d09e31c
f5ebe7c
51b32be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,10 +45,26 @@ using namespace llvm; | |
|
||
using DecodeStatus = llvm::MCDisassembler::DecodeStatus; | ||
|
||
static const MCSubtargetInfo &addDefaultWaveSize(const MCSubtargetInfo &STI, | ||
MCContext &Ctx) { | ||
if (!STI.hasFeature(AMDGPU::FeatureWavefrontSize64) && | ||
!STI.hasFeature(AMDGPU::FeatureWavefrontSize32)) { | ||
MCSubtargetInfo &STICopy = Ctx.getSubtargetCopy(STI); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't really understand this subtargetcopy business There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. STI is const, I cannot just flip the bit. The same is done in the AsmParser with copySTI(). |
||
// If there is no default wave size it must be a generation before gfx9, | ||
// these have FeatureWavefrontSize64 in their definition already. For gfx10+ | ||
// set wave32 as a default. | ||
STICopy.ToggleFeature(AMDGPU::FeatureWavefrontSize32); | ||
return STICopy; | ||
} | ||
|
||
return STI; | ||
} | ||
|
||
AMDGPUDisassembler::AMDGPUDisassembler(const MCSubtargetInfo &STI, | ||
MCContext &Ctx, MCInstrInfo const *MCII) | ||
: MCDisassembler(STI, Ctx), MCII(MCII), MRI(*Ctx.getRegisterInfo()), | ||
MAI(*Ctx.getAsmInfo()), TargetMaxInstBytes(MAI.getMaxInstLength(&STI)), | ||
: MCDisassembler(addDefaultWaveSize(STI, Ctx), Ctx), MCII(MCII), | ||
MRI(*Ctx.getRegisterInfo()), MAI(*Ctx.getAsmInfo()), | ||
TargetMaxInstBytes(MAI.getMaxInstLength(&STI)), | ||
CodeObjectVersion(AMDGPU::getDefaultAMDHSACodeObjectVersion()) { | ||
// ToDo: AMDGPUDisassembler supports only VI ISA. | ||
if (!STI.hasFeature(AMDGPU::FeatureGCN3Encoding) && !isGFX10Plus()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
; RUN: not llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,-wavefrontsize64 < %s 2>&1 | FileCheck %s -check-prefix=ERR -implicit-check-not=error: | ||
; RUN: not llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,-wavefrontsize64 < %s 2>&1 | FileCheck %s -check-prefix=ERR -implicit-check-not=error: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This diagnostics is now missing, BE will just initialize wavesize to default. If we want to catch this case we would still need to scan the original string. |
||
; RUN: not llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize32,+wavefrontsize64 < %s 2>&1 | FileCheck %s -check-prefix=ERR -implicit-check-not=error: | ||
; RUN: not llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize32,+wavefrontsize64 < %s 2>&1 | FileCheck %s -check-prefix=ERR -implicit-check-not=error: | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.