Skip to content

Commit 73f568c

Browse files
aratajewigcbot
authored andcommitted
Fix image tracking for GetBufferPtr scenario.
1 parent dc9c960 commit 73f568c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

IGC/Compiler/Optimizer/ValueTracker.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,16 +409,19 @@ Value* ValueTracker::trackValue(CallInst* CI, const uint index)
409409
{
410410
baseValue = cast<CallInst>(baseValue)->getOperand(0);
411411
}
412-
baseValue = nullptr;
412+
else if (auto* I = dyn_cast<GenIntrinsicInst>(baseValue))
413+
{
414+
baseValue = handleGenIntrinsic(I);
415+
}
416+
else
417+
{
418+
baseValue = nullptr;
419+
}
413420
}
414421
else if (auto* I = dyn_cast<CastInst>(baseValue))
415422
{
416423
baseValue = I->getOperand(0);
417424
}
418-
else if (auto* I = dyn_cast<GenIntrinsicInst>(baseValue))
419-
{
420-
baseValue = handleGenIntrinsic(I);
421-
}
422425
else if (auto* I = dyn_cast<ExtractElementInst>(baseValue))
423426
{
424427
baseValue = handleExtractElement(I);

0 commit comments

Comments
 (0)