Skip to content

Commit 427a492

Browse files
bcheng0127igcbot
authored andcommitted
Fix the bug in flag regsiter footprint tracking
We used to use getLeftBound() and getRightBound() to check the dependence. Now the architecture registers are using API ExRegNum and ExSubRegNum to get the register footprint
1 parent 4b1cdc1 commit 427a492

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

visa/LocalScheduler/SWSB_G4IR.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,10 +1184,11 @@ SBFootprint *G4_BB_SB::getFootprintForFlag(G4_Operand *opnd,
11841184
unsigned short RB = 0;
11851185
G4_Type type = opnd->getType();
11861186
bool valid = true;
1187+
unsigned regOff = opnd->getBase()->ExRegNum(valid);
11871188
unsigned subRegOff = opnd->getBase()->ExSubRegNum(valid);
1188-
LB =
1189-
(unsigned short)(opnd->getLeftBound() + subRegOff * 16) * FLAG_TO_GRF_MAP;
1190-
RB = (unsigned short)(opnd->getRightBound() + subRegOff * 16) *
1189+
LB = (unsigned short)(regOff * 32 + subRegOff * 16) * FLAG_TO_GRF_MAP;
1190+
RB = (unsigned short)(regOff * 32 + subRegOff * 16 + opnd->getRightBound() -
1191+
opnd->getLeftBound()) *
11911192
FLAG_TO_GRF_MAP;
11921193

11931194
LB += (builder.kernel.getNumRegTotal() + builder.getNumScalarRegisters() +

0 commit comments

Comments
 (0)