Skip to content

Commit 7439a3d

Browse files
MaciejKalinskisys_zuul
authored andcommitted
Second half in EmitPass::ScanReducePrepareSrc().
Set second half in SIMD32 for both instructions emitted by EmitPass::ScanReducePrepareSrc(). This is for better readability only - the first instruction has NoMask set, so these should be equivalent from HW perspective. Change-Id: I4ead70346bb838f37366532f0c0b464cf2e96198
1 parent ea54ffa commit 7439a3d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10387,15 +10387,16 @@ CVariable* EmitPass::ScanReducePrepareSrc(VISA_Type type, uint64_t identityValue
1038710387
dst->GetType() == type && dst->GetAlign() == IGC::EALIGN_GRF && !dst->IsUniform());
1038810388
}
1038910389

10390+
const bool savedSecondHalf = m_encoder->IsSecondHalf();
10391+
m_encoder->SetSecondHalf(secondHalf);
10392+
1039010393
// Set the GRF to <identity> with no mask. This will set all the registers to <identity>
1039110394
CVariable* pIdentityValue = m_currShader->ImmToVariable(identityValue, type);
1039210395
m_encoder->SetNoMask();
1039310396
m_encoder->Copy(dst, pIdentityValue);
1039410397
m_encoder->Push();
1039510398

1039610399
// Now copy the src with a mask so the disabled lanes still keep their <identity>
10397-
const bool savedSecondHalf = m_encoder->IsSecondHalf();
10398-
m_encoder->SetSecondHalf(secondHalf);
1039910400
if (negate)
1040010401
{
1040110402
m_encoder->SetSrcModifier(0, EMOD_NEG);
@@ -10406,6 +10407,7 @@ CVariable* EmitPass::ScanReducePrepareSrc(VISA_Type type, uint64_t identityValue
1040610407
}
1040710408
m_encoder->Copy(dst, src);
1040810409
m_encoder->Push();
10410+
1040910411
m_encoder->SetSecondHalf(savedSecondHalf);
1041010412

1041110413
return dst;

0 commit comments

Comments
 (0)