Skip to content

Commit d65d5cb

Browse files
fangliu2020sys_zuul
authored and
sys_zuul
committed
Fix the bug of no stateless-to-stateful converting if no GEP existed.
Change-Id: Iac2eb74f6c0ae86433ec47850458df87f3440e94
1 parent c9dc6b9 commit d65d5cb

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 (gep && cast<PointerType>(base->getType())->getAddressSpace() == ptrAS && !isa<Instruction>(base))
365+
if (cast<PointerType>(base->getType())->getAddressSpace() == ptrAS && !isa<Instruction>(base))
366366
{
367367
if (const KernelArg * arg = getKernelArg(base))
368368
{

0 commit comments

Comments
 (0)