if (block->kind & block_kind_top_level) {
if (ctx.loop && ctx.wqm) {
- /* mark all break conditions as WQM */
unsigned block_idx = block->index + 1;
while (!(ctx.program->blocks[block_idx].kind & block_kind_top_level)) {
+ /* flag all break conditions as WQM:
+ * the conditions might be computed outside the nested CF */
if (ctx.program->blocks[block_idx].kind & block_kind_break)
mark_block_wqm(ctx, block_idx);
+ /* flag all blocks as WQM to ensure we enter all (nested) loops in WQM */
+ exec_ctx.info[block_idx].block_needs |= WQM;
block_idx++;
}
} else if (ctx.loop && !ctx.wqm) {