[Mesa-dev] [PATCH 1/4] i965/vec4: Don't DCE flag-writing insts because dest was unused.

Matt Turner mattst88 at gmail.com
Thu Dec 4 15:05:56 PST 2014


---
Ken pointed this out in his review, and I fixed it in the FS, but apparently
forgot to fix it in the vec4 code.

 src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 b8370ba..9604e60 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
@@ -103,7 +103,7 @@ vec4_visitor::dead_code_eliminate()
                   progress = true;
 
                   if (inst->dst.writemask == 0) {
-                     if (inst->writes_accumulator) {
+                     if (inst->writes_accumulator || inst->writes_flag()) {
                         inst->dst = dst_reg(retype(brw_null_reg(), inst->dst.type));
                      } else {
                         inst->opcode = BRW_OPCODE_NOP;
-- 
2.0.4



More information about the mesa-dev mailing list