/* 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)
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;
+ }
+ }
+ }
}
}
}