Skip to content

Commit 938f47b

Browse files
Jay-Jiewu-Lugfxbot
authored andcommitted
fix potential nomask issue
Change-Id: Id850ab6ec88cb15936bae5da1c301324f2125d49
1 parent 7cb007a commit 938f47b

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -852,17 +852,27 @@ Common_VISA_EMask_Ctrl CEncoder::GetAluEMask(CVariable* dst)
852852
{
853853
e_mask mask = m_encoderState.m_mask;
854854
bool noMask = m_encoderState.m_noMask;
855-
if (dst && (dst->IsUniform() || m_encoderState.m_SubSpanDestination))
855+
if (dst)
856856
{
857-
if (dst->GetVarType() == EVARTYPE_ADDRESS)
857+
if (m_encoderState.m_SubSpanDestination)
858858
{
859-
noMask |= dst->IsVectorUniform();
859+
noMask = true;
860860
}
861861
else
862862
{
863-
noMask = true;
863+
if (dst->GetVarType() == EVARTYPE_ADDRESS)
864+
{
865+
if (dst->IsVectorUniform() && dst->IsUniform())
866+
{
867+
noMask = true;
868+
}
869+
}
870+
else if (dst->IsUniform())
871+
{
872+
noMask = true;
873+
}
864874
}
865-
}
875+
}
866876

867877
return ConvertMaskToVisaType(mask, noMask);
868878
}

0 commit comments

Comments
 (0)