Module: Mesa Branch: main Commit: 87cdcbd7d7a7b2c0d752e97d0bc1ec7763afad08 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=87cdcbd7d7a7b2c0d752e97d0bc1ec7763afad08
Author: Ian Romanick <[email protected]> Date: Wed Nov 29 18:20:47 2023 -0800 intel/compiler: Verify that DO is alone in the block Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26439> --- src/intel/compiler/brw_cfg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/intel/compiler/brw_cfg.cpp b/src/intel/compiler/brw_cfg.cpp index 514cfa75d27..01cb42635c1 100644 --- a/src/intel/compiler/brw_cfg.cpp +++ b/src/intel/compiler/brw_cfg.cpp @@ -802,6 +802,11 @@ cfg_t::validate(const char *stage_abbrev) backend_instruction *first_inst = block->start(); if (first_inst->opcode == BRW_OPCODE_DO) { + /* DO instructions both begin and end a block, so the DO instruction + * must be the only instruction in the block. + */ + cfgv_assert(exec_list_is_singular(&block->instructions)); + /* A block starting with DO should have exactly two successors. One * is a physical link to the block starting after the WHILE * instruction. The other is a logical link to the block starting the
