gpu-compute: Fix bug with return in cfg
Connecting basic blocks would stop too early in kernels where ret was not the last instruction. This patch allows basic blocks after the ret instruction to be properly connected.
This commit is contained in:
@@ -139,7 +139,7 @@ ControlFlowInfo::connectBasicBlocks()
|
||||
GPUStaticInst* last = lastInstruction(bb.get());
|
||||
if (last->o_type == Enums::OT_RET) {
|
||||
bb->successorIds.insert(exit_bb->id);
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
if (last->o_type == Enums::OT_BRANCH) {
|
||||
const uint32_t target_pc = last->getTargetPc();
|
||||
|
||||
Reference in New Issue
Block a user