Skip to content

Commit 301e26c

Browse files
committed
AMDGPU: Handle gfx950 XDL-write-overlapped-smfma-src-c wait state change
These have an additional wait state compared to gfx940.
1 parent faded39 commit 301e26c

File tree

3 files changed

+106
-60
lines changed

3 files changed

+106
-60
lines changed

llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,12 +2232,13 @@ int GCNHazardRecognizer::checkMAIHazards908(MachineInstr *MI) {
22322232
}
22332233

22342234
static int
2235-
GFX940_XDL_N_PassWritesVGPROverlappedSMFMASrcCWaitStates(int NumPasses) {
2236-
// 2 pass -> 3
2237-
// 4 pass -> 5
2238-
// 8 pass -> 9
2239-
// 16 pass -> 17
2240-
return NumPasses + 1;
2235+
GFX940_XDL_N_PassWritesVGPROverlappedSMFMASrcCWaitStates(int NumPasses, bool IsGFX950) {
2236+
// xdl def cycles | gfx940 | gfx950
2237+
// 2 pass | 3 4
2238+
// 4 pass | 5 6
2239+
// 8 pass | 9 10
2240+
// 16 pass | 17 18
2241+
return NumPasses + 1 + IsGFX950;
22412242
}
22422243

22432244
static int
@@ -2373,7 +2374,7 @@ int GCNHazardRecognizer::checkMAIHazards90A(MachineInstr *MI) {
23732374
NeedWaitStates =
23742375
isXDL(ST, *MI1)
23752376
? GFX940_XDL_N_PassWritesVGPROverlappedSMFMASrcCWaitStates(
2376-
NumPasses)
2377+
NumPasses, ST.hasGFX950Insts())
23772378
: GFX940_SMFMA_N_PassWritesVGPROverlappedSMFMASrcCWaitStates(
23782379
NumPasses);
23792380
break;

0 commit comments

Comments
 (0)