Skip to content

Commit ab8d937

Browse files
DianaChenigcbot
authored andcommitted
SWSB: fix indirect register dependency
Fixed a bug in SWSBSetter that swsb information was missing when there is dst dependency to an instruction having indirect sources.
1 parent bf7c580 commit ab8d937

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

visa/iga/IGALibrary/IR/SWSBSetter.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,10 @@ void SWSBAnalyzer::setSbidDependency(DepSet &dep, const Instruction &currInst,
487487
for (auto &aSBID : activeSBID) {
488488
if (aSBID.sbid == depSBID.sbid) {
489489
// write takes longer then read
490-
// so we only need to check on one.
491-
// so this either sets a write or resets back to read
492-
if (aSBID.dType == DEP_TYPE::READ) {
490+
// force the SBID to WRITE type (e.g. $10.dst) if the newly added
491+
// dependency is a write dependency.
492+
if (depSBID.dType == DEP_TYPE::WRITE ||
493+
depSBID.dType == DEP_TYPE::WRITE_ALWAYS_INTERFERE) {
493494
aSBID.dType = depSBID.dType;
494495
}
495496
push_back = false;

0 commit comments

Comments
 (0)