i965: check inst->predicate when clearing flag_live at dead code eliminate

Detected by Matt Turner while reviewing commit
a59359ecd2

Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Alejandro Piñeiro
2015-10-22 22:22:14 +02:00
parent c19443bc8b
commit c3d7caa1e0
2 changed files with 2 additions and 2 deletions
@@ -105,7 +105,7 @@ fs_visitor::dead_code_eliminate()
}
}
if (inst->writes_flag()) {
if (inst->writes_flag() && !inst->predicate) {
BITSET_CLEAR(flag_live, inst->flag_subreg);
}
@@ -145,7 +145,7 @@ vec4_visitor::dead_code_eliminate()
}
}
if (inst->writes_flag()) {
if (inst->writes_flag() && !inst->predicate) {
for (unsigned c = 0; c < 4; c++)
BITSET_CLEAR(flag_live, c);
}