Skip to content

Commit b25b5eb

Browse files
committed
[Autobackout][FuncReg]Revert of change: d65d5cb
Fix the bug of no stateless-to-stateful converting if no GEP existed. Change-Id: Ifa1eb9463f922ffee0794a867d4c03bd72ebdaf3
1 parent ab90e00 commit b25b5eb

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
@@ -362,7 +362,7 @@ bool StatelessToStatefull::pointerIsPositiveOffsetFromKernelArgument(
362362

363363
// stripPointerCasts might skip addrSpaceCast, thus check if AS is still
364364
// the original one. Also, if base is still instruction, skip.
365-
if (cast<PointerType>(base->getType())->getAddressSpace() == ptrAS && !isa<Instruction>(base))
365+
if (gep && cast<PointerType>(base->getType())->getAddressSpace() == ptrAS && !isa<Instruction>(base))
366366
{
367367
if (const KernelArg * arg = getKernelArg(base))
368368
{

0 commit comments

Comments
 (0)