Skip to content

Commit c9b1e30

Browse files
bcheng0127pszymich
authored andcommitted
fix HW WA
inserting instruction will introduce swizzle issue mov (8|M0) r19.0<2>:w r4.9<2;1,0>:w Need fix this issue as well.
1 parent 9d00a69 commit c9b1e30

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

visa/HWConformity.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6256,7 +6256,12 @@ void HWConformity::conformBB(G4_BB* bb)
62566256
for (; i != iEnd; i = next_iter)
62576257
{
62586258
++next_iter;
6259-
fixOddAlignSrc1Region(i, bb);
6259+
if (fixOddAlignSrc1Region(i, bb))
6260+
{
6261+
INST_LIST_ITER pre_iter = i;
6262+
pre_iter--;
6263+
fixByteXBarRestriction(pre_iter, bb);
6264+
}
62606265
#ifdef _DEBUG
62616266
verifyG4Kernel(kernel, Optimizer::PI_HWConformityChk, false);
62626267
#endif
@@ -7432,7 +7437,7 @@ void HWConformity::fixSrcRegion(G4_INST *inst) {
74327437
}
74337438
}
74347439

7435-
void HWConformity::fixOddAlignSrc1Region(INST_LIST_ITER i, G4_BB *bb)
7440+
bool HWConformity::fixOddAlignSrc1Region(INST_LIST_ITER i, G4_BB *bb)
74367441
{
74377442
G4_INST *inst = *i;
74387443

@@ -7451,9 +7456,11 @@ void HWConformity::fixOddAlignSrc1Region(INST_LIST_ITER i, G4_BB *bb)
74517456
G4_Operand *new_src1 =
74527457
insertMovBefore(i, 1, src1->getType(), bb, Even_Word);
74537458
inst->setSrc(new_src1, 1);
7459+
return true;
74547460
}
74557461
}
74567462
}
7463+
return false;
74577464
}
74587465

74597466
//

visa/HWConformity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ namespace vISA
127127
void fixDstHstride(INST_LIST_ITER i, int extypesize);
128128
void fixMADInst(G4_BB* bb);
129129
void fixSrcRegion(G4_INST *inst);
130-
void fixOddAlignSrc1Region(INST_LIST_ITER i, G4_BB *bb);
130+
bool fixOddAlignSrc1Region(INST_LIST_ITER i, G4_BB *bb);
131131
void conformBB(G4_BB * bb);
132132
void fixSADA2Inst(G4_BB* bb);
133133
void fixMixedHFInst(G4_BB* bb);

0 commit comments

Comments
 (0)