Skip to content

Commit 97790b7

Browse files
fangliu2020igcbot
authored andcommitted
Fix the assertion of "operand with mme must be GRF-aligned"
Fix the assertion of "operand with mme must be GRF-aligned"
1 parent d4f76aa commit 97790b7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

visa/VisaToG4/TranslateMath.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,7 +2292,7 @@ int IR_Builder::translateVISAInvmRsqtmInst(
22922292

22932293
G4_Declare *tdst = nullptr;
22942294
if (!noDstMove) {
2295-
tdst = createTempVarWithNoSpill(element_size, Ty, Any);
2295+
tdst = createTempVarWithNoSpill(element_size, Ty, getGRFAlign());
22962296
createPseudoKills({tdst}, PseudoKillType::Src);
22972297
}
22982298

@@ -2307,7 +2307,8 @@ int IR_Builder::translateVISAInvmRsqtmInst(
23072307
(src0RR->getModifier() != Mod_src_undef ||
23082308
(!src0RR->isScalar() && !tryToAlignOperand(src0RR, getGRFSize())));
23092309
if (needsSrc0Move) {
2310-
G4_Declare *tsrc0 = createTempVarWithNoSpill(element_size, Ty, Any);
2310+
G4_Declare *tsrc0 =
2311+
createTempVarWithNoSpill(element_size, Ty, getGRFAlign());
23112312
createPseudoKills({tsrc0}, PseudoKillType::Src);
23122313

23132314
G4_DstRegRegion *tSrc0 = createDst(tsrc0->getRegVar(), 0, 0, 1, Ty);
@@ -2320,7 +2321,8 @@ int IR_Builder::translateVISAInvmRsqtmInst(
23202321
(src1RR->getModifier() != Mod_src_undef ||
23212322
(!src1RR->isScalar() && !tryToAlignOperand(src1RR, getGRFSize()))));
23222323
if (needsSrc1Move) {
2323-
G4_Declare *tsrc1 = createTempVarWithNoSpill(element_size, Ty, Any);
2324+
G4_Declare *tsrc1 =
2325+
createTempVarWithNoSpill(element_size, Ty, getGRFAlign());
23242326
createPseudoKills({tsrc1}, PseudoKillType::Src);
23252327

23262328
G4_DstRegRegion *tSrc1 = createDst(tsrc1->getRegVar(), 0, 0, 1, Ty);

0 commit comments

Comments
 (0)