Skip to content

Commit 367c2bd

Browse files
scottp101igcbot
authored andcommitted
small refactor
small refactor
1 parent 3c14f88 commit 367c2bd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19672,6 +19672,12 @@ void EmitPass::emitLSCVectorLoad(Instruction* inst,
1967219672
uint32_t eltBytes = GetScalarTypeSizeInRegister(eltTy);
1967319673
uint32_t elts = VTy ? int_cast<uint32_t>(VTy->getNumElements()) : 1;
1967419674

19675+
int immScaleInt =
19676+
immScale ? static_cast<int>(immScale->getSExtValue()) : 1;
19677+
19678+
int immOffsetInt =
19679+
immOffset ? static_cast<int>(immOffset->getSExtValue()) : 0;
19680+
1967519681
CountStatelessIndirectAccess(Ptr, resource);
1967619682
// eOffset is in bytes
1967719683
// offset corresponds to Int2Ptr operand obtained during pattern matching
@@ -19688,11 +19694,6 @@ void EmitPass::emitLSCVectorLoad(Instruction* inst,
1968819694
IGC_ASSERT_MESSAGE(!(destUniform && !srcUniform),
1968919695
"Unexpected ld: uniform dest and non-uniform src!");
1969019696

19691-
const int immOffsetInt =
19692-
immOffset ? static_cast<int>(immOffset->getSExtValue()) : 0;
19693-
const int immScaleInt =
19694-
immScale ? static_cast<int>(immScale->getSExtValue()) : 1;
19695-
1969619697
// 1. handle cases eltBytes < 4
1969719698
if (eltBytes < 4)
1969819699
{

0 commit comments

Comments
 (0)