diff --git a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp index d5dd2c2954e..4e3b611197a 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp @@ -215,18 +215,17 @@ fs_visitor::register_coalesce() reg_from = -1; } - if (progress) { - foreach_list_safe(node, &this->instructions) { - fs_inst *inst = (fs_inst *)node; + foreach_list_safe(node, &this->instructions) { + fs_inst *inst = (fs_inst *)node; - if (inst->opcode == BRW_OPCODE_NOP) { - inst->remove(); - progress = true; - } + if (inst->opcode == BRW_OPCODE_NOP) { + inst->remove(); + progress = true; } - - invalidate_live_intervals(); } + if (progress) + invalidate_live_intervals(); + return progress; }