From 15f6118b77cbe42fb997174715bce4c2548aa1f1 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 3 Dec 2014 23:32:30 -0800 Subject: [PATCH] i965/vec4: Don't DCE flag-writing insts because dest was unused. Reviewed-by: Jason Ekstrand --- 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 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; -- 2.30.2