i965/vec4: Don't dead code eliminate instructions writing the flag.

A future patch adds support for removing dead writes to the flag
register. This patch simplifies the logic until then.

total instructions in shared programs: 811813 -> 811869 (0.01%)
instructions in affected programs:     3378 -> 3434 (1.66%)

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Matt Turner 2014-03-11 13:07:42 -07:00
parent 3a12f50f9c
commit 89ccd11eeb
1 changed files with 5 additions and 1 deletions

View File

@ -356,7 +356,11 @@ vec4_visitor::dead_code_eliminate()
inst->dst = dst_reg(retype(brw_null_reg(), inst->dst.type));
break;
default:
inst->remove();
if (inst->writes_flag()) {
inst->dst = dst_reg(retype(brw_null_reg(), inst->dst.type));
} else {
inst->remove();
}
break;
}
progress = true;