Skip to content

Commit 99df017

Browse files
ichenkaiigcbot
authored andcommitted
Restore default dst lifetime_start for emitting Gather4Instruction and AtomicRaw
This is to restore the lifetime_start for m_destination for emitting Gather4Instruction and AtomicRaw.
1 parent c60d1f3 commit 99df017

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
@@ -8046,7 +8046,8 @@ void EmitPass::emitGather4Instruction(SamplerGatherIntrinsic *inst) {
80468046
bool feedbackEnable = (m_destination->GetNumberElement() / numLanes(m_currShader->m_SIMDSize) == 5) ? true : false;
80478047
uint label = 0;
80488048
CVariable *flag = nullptr;
8049-
bool needLoop = ResourceLoopHeader(dst, resource, sampler, flag, label);
8049+
CVariable *dest = dst ? dst : m_destination;
8050+
bool needLoop = ResourceLoopHeader(dest, resource, sampler, flag, label);
80508051
ResourceLoopSubIteration(resource, sampler, flag, label);
80518052
m_encoder->SetPredicate(flag);
80528053
m_encoder->Gather4Inst(opCode, offset, resource, pairedResource, sampler, numSources, dst, payload, channel,
@@ -14585,7 +14586,8 @@ void EmitPass::emitAtomicRaw(llvm::GenIntrinsicInst *pInst, Value *dstAddr, Cons
1458514586
}
1458614587
uint label = 0;
1458714588
CVariable *flag = nullptr;
14588-
bool needLoop = ResourceLoopHeader(pDst, resource, flag, label);
14589+
CVariable *dest = pDst ? pDst : m_destination;
14590+
bool needLoop = ResourceLoopHeader(dest, resource, flag, label);
1458914591
ResourceLoopSubIteration(resource, flag, label);
1459014592
if (shouldGenerateLSC(pInst)) {
1459114593
auto cacheOpts = LSC_DEFAULT_CACHING;

0 commit comments

Comments
 (0)