Skip to content

Commit 603b9dd

Browse files
aratajewigcbot
authored andcommitted
Fix alignment of source used by lsc.store that pushes frame-pointer to the stack
The source operand of `lsc.store` must be GRF-aligned. IGC was missing the logic that would realign the variable used for keeping the caller frame's frame-pointer. Without this fix, `FP_1` variable is `qword` aligned: ``` .decl FP_1 v_type=G type=uq num_elts=1 align=qword lsc_store.ugm (M1_NM, 1) flat[FP_2]:a64 FP_1:d64t ``` Then after register allocation, it becomes `r59.1` that is not GRF-aligned. This fix changes the alignment of `FP_1` to be equal to GRF-width: ``` .decl FP_1 v_type=G type=uq num_elts=1 align=wordx32 ```
1 parent 58f91e2 commit 603b9dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18819,6 +18819,7 @@ void EmitPass::emitPushFrameToStack(unsigned& pushSize)
1881918819
}
1882018820

1882118821
pFP = ReAlignUniformVariable(pFP, EALIGN_GRF);
18822+
pOldFP = ReAlignUniformVariable(pOldFP, EALIGN_GRF);
1882218823
bool useA64 = (pFP->GetSize() == 8);
1882318824
if (shouldGenerateLSC())
1882418825
{

0 commit comments

Comments
 (0)