Skip to content

Commit 1084303

Browse files
bcheng0127igcbot
authored andcommitted
Remove WAR dependence for flag register
Remove WAR dependence for flag register
1 parent 1b95049 commit 1084303

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

visa/HWCaps.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,10 @@ bool needA0WAR() const {
926926
return (getPlatform() >= Xe2);
927927
}
928928

929+
bool needFlagWAR() const {
930+
return (getPlatform() < Xe3);
931+
}
932+
929933
bool alwaysAllowGlobalFlagOpt() const {
930934
// We shouldn't add this kind of ugly platform check. However, there's
931935
// a complicated bug found in TGLLP when disabling a flagopt case. There

visa/LocalScheduler/SWSB_G4IR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5898,7 +5898,7 @@ bool G4_BB_SB::getFootprintForOperand(SBNode *node, G4_INST *inst,
58985898
footprint = getFootprintForACC(opnd, opndNum, inst);
58995899
node->setFootprint(footprint, opndNum);
59005900
}
5901-
if (isFlagReg) {
5901+
if (builder.needFlagWAR() && isFlagReg) {
59025902
footprint = getFootprintForFlag(opnd, opndNum, inst);
59035903
node->setFootprint(footprint, opndNum);
59045904
}

0 commit comments

Comments
 (0)