Skip to content

Commit 275c2c8

Browse files
bcheng0127sys_zuul
authored andcommitted
Set the alignment for the visa emit.
Change-Id: I3948bb9a7c8d560b74684d8c6ae2a737ce44c6f4
1 parent b349751 commit 275c2c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

visa/VISAKernelImpl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,10 +779,12 @@ int VISAKernelImpl::CreateVISAGenVar(VISA_GenVar *& decl, const char *varName, i
779779
}
780780

781781
// force subalign to be GRF if total size is larger than or equal to GRF
782-
if (info->dcl->getSubRegAlign() != GRFALIGN)
782+
if ((info->dcl->getSubRegAlign() != GRFALIGN) ||
783+
(varAlign == ALIGN_2_GRF))
783784
{
784785
setDeclAlignment(info->dcl, varAlign);
785786
}
787+
786788
info->name_index = -1;
787789
}
788790

0 commit comments

Comments
 (0)