@@ -5989,7 +5989,7 @@ void HWConformity::conformBB(G4_BB* bb)
5989
5989
}
5990
5990
// do this early since otherwise the moves inserted by other passes may still
5991
5991
// inherit bad regions from the original inst
5992
- fixSrcRegion (inst );
5992
+ fixSrcRegion (i, bb );
5993
5993
5994
5994
bool changed = fixMov (i, bb);
5995
5995
if (changed)
@@ -7298,8 +7298,8 @@ G4_INST* HWConformity::splitInstWithByteDst(G4_INST* expand_op)
7298
7298
// 7. Dst.HorzStride must not be 0. -- this needs not to be checked.
7299
7299
// 8. VertStride must be used to cross GRF register boundaries. This rule implies that
7300
7300
// elements within a 'Width' cannot cross GRF boundaries.
7301
- void HWConformity::fixSrcRegion (G4_INST* inst)
7302
- {
7301
+ void HWConformity::fixSrcRegion (INST_LIST_ITER i, G4_BB *bb) {
7302
+ G4_INST *inst = *i;
7303
7303
bool comprInst = isCompressedInst (inst);
7304
7304
for (int i = 0 ; i < G4_MAX_SRCS; i++)
7305
7305
{
@@ -7411,10 +7411,27 @@ void HWConformity::fixSrcRegion(G4_INST* inst)
7411
7411
}
7412
7412
}
7413
7413
}
7414
+
7414
7415
if (inst->getDst () && !inst->hasNULLDst ())
7415
7416
{
7416
7417
MUST_BE_TRUE (inst->getDst ()->getHorzStride () != 0 ,
7417
7418
" Bad source region: Width is greater than execution size." );
7419
+
7420
+ if (builder.hasBDstWSrc1EvenAlignIssue ()) {
7421
+ G4_Operand *src1 = inst->getSrc (1 );
7422
+ if (src1 && src1->isSrcRegRegion ()) {
7423
+ G4_Operand *dst = inst->getDst ();
7424
+ if (dst && dst->isDstRegRegion () &&
7425
+ dst->asDstRegRegion ()->getHorzStride () > 2 &&
7426
+ (dst->getType () == Type_B || dst->getType () == Type_UB) &&
7427
+ (src1->getType () == Type_W || src1->getType () == Type_UW) &&
7428
+ (src1->asSrcRegRegion ()->getSubRegOff () % 2 )) {
7429
+ G4_Operand *new_src1 =
7430
+ insertMovBefore (i, 1 , src1->getType (), bb, Even_Word);
7431
+ inst->setSrc (new_src1, 1 );
7432
+ }
7433
+ }
7434
+ }
7418
7435
}
7419
7436
}
7420
7437
0 commit comments