The spec defines a break block and a continue block, and says that they are valid only for the innermost loop they are nested inside of.
This prohibits entering a single-block loop, because technically the predecessor of the loop header that is not in the loop becomes both a break block and a continue block.
This CFG, from @vili-1's mc-imperial/spirv-control-flow#36, illustrates the issue:
The edge 14->16 is problematic according to the current definition of break and continue blocks.
The spec defines a break block and a continue block, and says that they are valid only for the innermost loop they are nested inside of.
This prohibits entering a single-block loop, because technically the predecessor of the loop header that is not in the loop becomes both a break block and a continue block.
This CFG, from @vili-1's mc-imperial/spirv-control-flow#36, illustrates the issue:
The edge 14->16 is problematic according to the current definition of break and continue blocks.