From: Matt Turner Date: Thu, 4 Dec 2014 07:32:30 +0000 (-0800) Subject: i965/vec4: Don't DCE flag-writing insts because dest was unused. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=15f6118b77cbe42fb997174715bce4c2548aa1f1;p=mesa.git i965/vec4: Don't DCE flag-writing insts because dest was unused. Reviewed-by: Jason Ekstrand --- 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 b8370ba63ec..9604e608778 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;