diff --git a/visa/HWCaps.inc b/visa/HWCaps.inc index 1f97ccec73e7..1feb22589af0 100644 --- a/visa/HWCaps.inc +++ b/visa/HWCaps.inc @@ -840,11 +840,11 @@ bool WARLocalization() const { } bool hasPVCSendWARWA() const { - return getPlatform() == Xe_PVC; + return getPlatform() == Xe_PVC || getPlatform() == Xe_PVCXT; } bool PVCSendWARWA() const { - if (getOption(vISA_PVCSendWARWA) && getPlatform() == Xe_PVC) { + if (getOption(vISA_PVCSendWARWA) && (getPlatform() == Xe_PVC || getPlatform() == Xe_PVCXT)) { return true; } return false; diff --git a/visa/LocalScheduler/SWSB_G4IR.cpp b/visa/LocalScheduler/SWSB_G4IR.cpp index 5801aaa0ef00..7a502138a356 100644 --- a/visa/LocalScheduler/SWSB_G4IR.cpp +++ b/visa/LocalScheduler/SWSB_G4IR.cpp @@ -4735,6 +4735,16 @@ void SWSB::insertPVCWA() { std::vector LSCLastTwoGRFsOfToken(totalTokenNum); std::vector nonLSClastTwoGRFsOfToken(totalTokenNum); + auto cleanLSCGRF = [&](unsigned short i) { + LSCLastTwoGRFsOfToken[i].first = LSCLastTwoGRFsOfToken[i].second = + INVALID_GRF; + }; + + auto cleanNonLSCGRF = [&](unsigned short i) { + nonLSClastTwoGRFsOfToken[i].first = nonLSClastTwoGRFsOfToken[i].second = + INVALID_GRF; + }; + auto cleanGRF = [&](unsigned short i) { LSCLastTwoGRFsOfToken[i].first = LSCLastTwoGRFsOfToken[i].second = INVALID_GRF; @@ -4820,9 +4830,11 @@ void SWSB::insertPVCWA() { if (inst->getMsgDesc()->isLSC()) { getLastTwoGRFsOfSend(LSCLastTwoGRFs, LSCLastTwoTokens, inst); assignLSCGRF(token); + cleanNonLSCGRF(token); } else { getLastTwoGRFsOfSend(nonLSCLastTwoGRFs, nonLSCLastTwoTokens, inst); assignNonLSCGRF(token); + cleanLSCGRF(token); } continue; } @@ -4909,7 +4921,7 @@ void SWSB::insertPVCWA() { // Add WA for .src if (insertDummyMovs(bb, inst_it, token, LSCLastTwoGRFsOfToken, nonLSClastTwoGRFsOfToken)) { - cleanGRFs(); + cleanGRF(token); insertSyncInt1(bb, inst_it); if (inst->opcode() == G4_sync_nop && inst->getDistanceTypeXe() ==