@@ -1308,7 +1308,7 @@ bool HWConformity::evenlySplitInst( INST_LIST_ITER iter, G4_BB* bb, bool checkOv
13081308 extraMov = checkSrcDstOverlap (iter, bb, false );
13091309 }
13101310
1311- bool use_arc_reg = false ;
1311+ bool useARF = false ;
13121312 for (int i = 0 ; i < numSrc; i++)
13131313 {
13141314 srcs[i] = inst->getSrc (i);
@@ -1343,13 +1343,14 @@ bool HWConformity::evenlySplitInst( INST_LIST_ITER iter, G4_BB* bb, bool checkOv
13431343 }
13441344
13451345 G4_DstRegRegion *accDstRegion = NULL ;
1346- if ( inst->getImplAccDst () )
1346+ if ( inst->getImplAccDst ())
13471347 {
13481348 accDstRegion = inst->getImplAccDst ();
13491349 }
1350- if ( accSrcRegion || accDstRegion || newPred || newCond )
1350+
1351+ if (accSrcRegion || accDstRegion || newPred || newCond)
13511352 {
1352- use_arc_reg = true ;
1353+ useARF = true ;
13531354 }
13541355
13551356 for ( int i = 0 ; i < instExSize; i += currExSize )
@@ -1425,11 +1426,12 @@ bool HWConformity::evenlySplitInst( INST_LIST_ITER iter, G4_BB* bb, bool checkOv
14251426 }
14261427
14271428 // set mask
1428- if (!inst->isWriteEnableInst () || use_arc_reg)
1429+ bool needsMaskOffset = useARF || (bb->isInSimdFlow () && !inst->isWriteEnableInst ());
1430+ if (needsMaskOffset)
14291431 {
14301432 int newMaskOffset = origMaskOffset + (i == 0 ? 0 : currExSize);
1431- bool nibOk = G4_Type_Table[inst-> getDst ()-> getType ()]. byteSize == 8 ||
1432- G4_Type_Table[ inst->getExecType ()]. byteSize == 8 ;
1433+ bool nibOk = builder. hasNibCtrl () &&
1434+ ( getTypeSize ( inst->getDst ()-> getType ()) == 8 || getTypeSize (inst-> getExecType ()) == 8 ) ;
14331435 G4_InstOption newMask = G4_INST::offsetToMask (currExSize, newMaskOffset, nibOk);
14341436 if (newMask == InstOpt_NoOpt)
14351437 {
0 commit comments