summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Piñeiro <[email protected]>2015-10-22 22:22:14 +0200
committerAlejandro Piñeiro <[email protected]>2015-11-04 19:33:56 +0100
commitc3d7caa1e006f00c3544a79a0be7d78904ce4177 (patch)
treea1945c50393eec5d5f6741177f909de7d85f4892
parentc19443bc8b68ef4697ead1998286e42bd4d8a572 (diff)
i965: check inst->predicate when clearing flag_live at dead code eliminate
Detected by Matt Turner while reviewing commit a59359ecd22154cc2b3f88bb8c599f21af8a3934 Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
index 4b5548a9dc5..1eaf1478877 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
@@ -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);
}
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp
index 284e0a8d0a5..e8a51d6e066 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp
@@ -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);
}