@@ -478,6 +478,7 @@ bool SRSubPassBeforeRA::isSRCandidateBeforeRA(G4_INST *inst,
478478    return  false ;
479479  }
480480
481+ 
481482  int  movInstNum = 0 ;
482483  int32_t  firstDefID = 0x7FFFFFFF ; //  the ID of the first instruction define the
483484  std::vector<std::pair<Gen4_Operand_Number, unsigned >> notRemoveableMap;
@@ -582,17 +583,18 @@ bool SRSubPassBeforeRA::isSRCandidateBeforeRA(G4_INST *inst,
582583    // if opndNum + offset is defined multiple times, cannobe be removed
583584    G4_Operand *dst = movInst->getDst ();
584585    unsigned  offset = dst->getLeftBound () / builder.getGRFSize ();
585-     Gen4_Operand_Number opndNum =
586-         (*I).second ; //  The source opndNum of send instruction which was defined
586+     //  The source opndNum of send instruction which was defined
587+     Gen4_Operand_Number opndNum = (*I).second ;
588+ 
587589    if  (isRemoveAble (movInst)) {
588590      auto  iter = std::find_if (
589591          dstSrcRegs.dstSrcMap .begin (), dstSrcRegs.dstSrcMap .end (),
590592                            [opndNum, offset](regMapBRA regmap) {
591593                              return  regmap.opndNum  == opndNum &&
592594                                     regmap.offset  == offset;
593595                            });
594-       if  (iter != 
595-            dstSrcRegs.dstSrcMap .end ()) {  //  multiple define, cannot be removed 
596+       //   if multiple defined, cannot be removed 
597+       if  (iter !=  dstSrcRegs.dstSrcMap .end ()) {
596598        notRemoveableMap.push_back (std::make_pair (opndNum, offset));
597599      } else  {
598600        G4_Operand *src = movInst->getSrc (0 );
0 commit comments