- int movs = count_movs_from_if(then_mov, else_mov, if_inst, else_inst);
+ bblock_t *then_block = block->next();
+ bblock_t *else_block = NULL;
+ foreach_list_typed(bblock_link, child, link, &block->children) {
+ if (child->block != then_block) {
+ if (child->block->prev()->end()->opcode == BRW_OPCODE_ELSE) {
+ else_block = child->block;
+ }
+ break;
+ }
+ }
+ if (else_block == NULL)
+ continue;
+
+ int movs = count_movs_from_if(then_mov, else_mov, then_block, else_block);