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:
parent
febab25957
commit
6a668d0c0c
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ ControlFlowInfo::connectBasicBlocks()
|
||||||
GPUStaticInst* last = lastInstruction(bb.get());
|
GPUStaticInst* last = lastInstruction(bb.get());
|
||||||
if (last->o_type == Enums::OT_RET) {
|
if (last->o_type == Enums::OT_RET) {
|
||||||
bb->successorIds.insert(exit_bb->id);
|
bb->successorIds.insert(exit_bb->id);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
if (last->o_type == Enums::OT_BRANCH) {
|
if (last->o_type == Enums::OT_BRANCH) {
|
||||||
const uint32_t target_pc = last->getTargetPc();
|
const uint32_t target_pc = last->getTargetPc();
|
||||||
|
|
Loading…
Reference in a new issue