Skip to content

Commit 68c609e

Browse files
pszymichgfxbot
authored andcommitted
In StatelessToStatefull check for address-space. unity between
original instruction and last. GetElementPointer while also respecting simple pointers Change-Id: I6308db3eeb67ac3be7224f12fc85a198c5078e3b
1 parent 7ed62c9 commit 68c609e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IGC/Compiler/Optimizer/OpenCLPasses/StatelessToStatefull/StatelessToStatefull.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ bool StatelessToStatefull::pointerIsPositiveOffsetFromKernelArgument(
353353

354354
// stripPointerCasts might skip addrSpaceCast, thus check if AS is still
355355
// the original one. Also, if base is still instruction, skip.
356-
if ((gep && gep->getAddressSpace() == ptrAS) && !isa<Instruction>(base))
356+
if (gep && cast<PointerType>(base->getType())->getAddressSpace() == ptrAS && !isa<Instruction>(base))
357357
{
358358
if (const KernelArg* arg = getKernelArg(base))
359359
{

0 commit comments

Comments
 (0)