Skip to content

Commit 8cb6c99

Browse files
authored
AMDGPU: Handle gfx950 XDL-write-overlapped-smfma-src-c wait state change (#117263)
These have an additional wait state compared to gfx940.
1 parent b078b88 commit 8cb6c99

File tree

3 files changed

+107
-60
lines changed

3 files changed

+107
-60
lines changed

llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,12 +2232,14 @@ 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,
2236+
bool IsGFX950) {
2237+
// xdl def cycles | gfx940 | gfx950
2238+
// 2 pass | 3 4
2239+
// 4 pass | 5 6
2240+
// 8 pass | 9 10
2241+
// 16 pass | 17 18
2242+
return NumPasses + 1 + IsGFX950;
22412243
}
22422244

22432245
static int
@@ -2373,7 +2375,7 @@ int GCNHazardRecognizer::checkMAIHazards90A(MachineInstr *MI) {
23732375
NeedWaitStates =
23742376
isXDL(ST, *MI1)
23752377
? GFX940_XDL_N_PassWritesVGPROverlappedSMFMASrcCWaitStates(
2376-
NumPasses)
2378+
NumPasses, ST.hasGFX950Insts())
23772379
: GFX940_SMFMA_N_PassWritesVGPROverlappedSMFMASrcCWaitStates(
23782380
NumPasses);
23792381
break;

0 commit comments

Comments
 (0)