@@ -588,7 +588,7 @@ bool HWConformity::fixMathInst(INST_LIST_ITER it, G4_BB *bb)
588588 bool needsSrc0Mov = needsMove (0 , src0_type);
589589 if (needsSrc0Mov)
590590 {
591- inst->setSrc (insertMovBefore (it, 0 , src0->isImm () ? getNonVectorType (src0_type) : src0_type, bb), 0 );
591+ inst->setSrc (insertMovBefore (it, 0 , src0->isImm () ? G4_Operand::GetNonVectorImmType (src0_type) : src0_type, bb), 0 );
592592 src0 = inst->getSrc (0 );
593593 }
594594 }
@@ -609,7 +609,7 @@ bool HWConformity::fixMathInst(INST_LIST_ITER it, G4_BB *bb)
609609 }
610610 else
611611 {
612- inst->setSrc (insertMovBefore (it, 1 , src1->isImm () ? getNonVectorType (src1_type) : src1_type, bb), 1 );
612+ inst->setSrc (insertMovBefore (it, 1 , src1->isImm () ? G4_Operand::GetNonVectorImmType (src1_type) : src1_type, bb), 1 );
613613 }
614614 src1 = inst->getSrc (1 );
615615 }
@@ -752,7 +752,7 @@ void HWConformity::fixImmAndARFSrc(INST_LIST_ITER it, G4_BB *bb)
752752
753753 if (needConstMov)
754754 {
755- G4_Type tmpType = getNonVectorType (src0->getType ());
755+ G4_Type tmpType = G4_Operand::GetNonVectorImmType (src0->getType ());
756756
757757 G4_Operand* newSrc0 = insertMovBefore (it, 0 , tmpType, bb);
758758 inst->setSrc (newSrc0, 0 );
@@ -859,7 +859,7 @@ void HWConformity::fixImmAndARFSrc(INST_LIST_ITER it, G4_BB *bb)
859859 // mov(8) TV0(0, 0)<1> : uw 0xeca86420 : uv{ Align1 }
860860 // add(8) A0(0, 0)<1> : uw &V36 + 0 TV0(0, 0)<8; 8, 1> : uw{ Align1, Q1 }
861861 G4_Type type = src1->getType ();
862- inst->setSrc (insertMovBefore (it, 1 , getNonVectorType (type), bb), 1 );
862+ inst->setSrc (insertMovBefore (it, 1 , G4_Operand::GetNonVectorImmType (type), bb), 1 );
863863 // And we swap addr expr and the new variable
864864 // add(8) A0(0, 0)<1> : uw TV0(0, 0)<8; 8, 1> : uw &V36 + 0 {Align1, Q1}
865865 // The final code sequence is
@@ -872,7 +872,7 @@ void HWConformity::fixImmAndARFSrc(INST_LIST_ITER it, G4_BB *bb)
872872 else
873873 {
874874 G4_Type newSrcType = inst->needsDWType () ? (IS_UNSIGNED_INT (src0->getType ()) ? Type_UD : Type_D) :
875- getNonVectorType (src0->getType ());
875+ G4_Operand::GetNonVectorImmType (src0->getType ());
876876 inst->setSrc (insertMovBefore (it, 0 , newSrcType, bb), 0 );
877877 }
878878 }
0 commit comments