intel/compiler: Verify that DO is alone in the block

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26439>
This commit is contained in:
Ian Romanick 2023-11-29 18:20:47 -08:00 committed by Marge Bot
parent 65237f8bbc
commit 87cdcbd7d7

View file

@ -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