Skip to content

Commit 1eb005a

Browse files
MiloszSkobejkoigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 619e0f7
Fixed insertelement indirect addressing When handling emitInsert() function with simd32 enabled, generated code was filling address register with values from uninitialized part of other grf register. This issue was happening when insertelement intruction used runtime indirect addressing and passed arguements were not uniform. Previously sub region for second loop iteriation that generated addr_add instruction was always set to 16, which was incorrect when variable datatype inside vector was 64 bit. It caused filling the same grf register twice instead of filling the next one. Changing sub region to 0 instead of 16 when datatype is 64 bit fixes this issue.
1 parent 7233428 commit 1eb005a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12243,10 +12243,9 @@ void EmitPass::emitInsert(llvm::Instruction* inst)
1224312243
CVariable* dst = m_destination;
1224412244
if (i == 1)
1224512245
{
12246-
IGC_ASSERT_MESSAGE(getGRFSize() == 64, "This code should execute for 64 byte GRF register size device");
1224712246
// explicitly set second half as we are manually splitting
1224812247
m_encoder->SetSecondHalf(true);
12249-
m_encoder->SetSrcSubReg(1, vecTypeSize == 8 ? 0 : 16);
12248+
m_encoder->SetSrcSubReg(1, 16);
1225012249
dst = m_currShader->GetNewAlias(dst, dst->GetType(), 16 * dst->GetElemSize(), 0);
1225112250
}
1225212251
CVariable* pDstArrElm = m_currShader->GetNewAddressVariable(

0 commit comments

Comments
 (0)