aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-03-11 13:07:42 -0700
committerMatt Turner <[email protected]>2014-03-24 11:06:26 -0700
commit89ccd11eebeee884d581e831b61368ac97057b43 (patch)
treeee6ec43d507c73ef0ff7de2830a24a87ef2ddece /src/mesa
parent3a12f50f9ca7f03f470ee053b9076ac12c4d486d (diff)
i965/vec4: Don't dead code eliminate instructions writing the flag.
A future patch adds support for removing dead writes to the flag register. This patch simplifies the logic until then. total instructions in shared programs: 811813 -> 811869 (0.01%) instructions in affected programs: 3378 -> 3434 (1.66%) Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index cb87fecf8d8..d07e8c558c2 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -356,7 +356,11 @@ vec4_visitor::dead_code_eliminate()
inst->dst = dst_reg(retype(brw_null_reg(), inst->dst.type));
break;
default:
- inst->remove();
+ if (inst->writes_flag()) {
+ inst->dst = dst_reg(retype(brw_null_reg(), inst->dst.type));
+ } else {
+ inst->remove();
+ }
break;
}
progress = true;