diff options
author | Eric Anholt <[email protected]> | 2011-09-01 16:40:07 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-09-08 21:40:39 -0700 |
commit | 6d0c018776977219e355c534eaafec53a30d993b (patch) | |
tree | 3b8ec8a4a371b0d991c596228f92079c711584d1 /src/mesa/drivers/dri | |
parent | cc9eb936c220267b6130b705fc696d05906a31df (diff) |
i965/vs: Clear tracked copy propagation values whose source gets overwritten.
This only occurs for GRFs, and hasn't mattered until now because we
only copy propagated non-GRFs.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp index 4b33df1f105..7862d78ab33 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp @@ -289,9 +289,6 @@ vec4_visitor::opt_copy_propagation() /* For any updated channels, clear tracking of them as a source * or destination. - * - * FINISHME: Sources aren't handled, which will need to be done - * for copy propagation. */ if (inst->dst.file == GRF) { if (inst->dst.reladdr) @@ -303,6 +300,18 @@ vec4_visitor::opt_copy_propagation() if (inst->dst.writemask & (1 << i)) cur_value[reg][i] = NULL; } + + for (int i = 0; i < virtual_grf_reg_count; i++) { + for (int j = 0; j < 4; j++) { + if (inst->dst.writemask & (1 << i) && + cur_value[i][j] && + cur_value[i][j]->file == GRF && + cur_value[i][j]->reg == inst->dst.reg && + cur_value[i][j]->reg == inst->dst.reg) { + cur_value[i][j] = NULL; + } + } + } } } } |