i965/vec4: Don't DCE flag-writing insts because dest was unused.
authorMatt Turner <mattst88@gmail.com>
Thu, 4 Dec 2014 07:32:30 +0000 (23:32 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 5 Dec 2014 17:49:42 +0000 (09:49 -0800)
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp

index b8370ba63ec7d2a42c69d4cb4c7264f304a25eca..9604e60877871f9f9a0a00630c10b47fb9ba1668 100644 (file)
@@ -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;