Skip to content

Commit 211eaf0

Browse files
jfuentessys_zuul
authored andcommitted
Update cross GRF calculation.
GRF crossing is now calculated as the difference between right and left bound. Change-Id: Ib46d4e47b1ed84c8180fb1934f731a9a49c7a3de
1 parent 2cb98c2 commit 211eaf0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

visa/InstSplit.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void InstSplitPass::run()
7676
}
7777

7878
if (inst->isSend() || inst->opcode() == G4_label || inst->opcode() == G4_pln
79-
|| inst->opcode() == G4_return || inst->isFlowControl())
79+
|| inst->opcode() == G4_return || inst->isFlowControl() || inst->isPseudoLogic())
8080
{
8181
continue;
8282
}
@@ -109,7 +109,7 @@ INST_LIST_ITER InstSplitPass::splitInstruction(INST_LIST_ITER it)
109109
G4_SrcRegRegion* src = opnd->asSrcRegRegion();
110110
uint32_t leftBound = 0, rightBound = 0;
111111
computeSrcBounds(src, leftBound, rightBound);
112-
return (leftBound / (getGRFSize() * 2u)) != (rightBound / (getGRFSize() * 2u));
112+
return (rightBound - leftBound) > (getGRFSize() * 2u);
113113
};
114114

115115
auto cross2GRFDst = [inst, this](G4_DstRegRegion* dst)
@@ -120,7 +120,7 @@ INST_LIST_ITER InstSplitPass::splitInstruction(INST_LIST_ITER it)
120120
}
121121
uint32_t leftBound = 0, rightBound = 0;
122122
computeDstBounds(dst, leftBound, rightBound);
123-
return (leftBound / (getGRFSize() * 2u)) != (rightBound / (getGRFSize() * 2u));
123+
return (rightBound - leftBound) > (getGRFSize() * 2u);
124124
};
125125

126126
// Check sources

0 commit comments

Comments
 (0)