}
/* Track available source registers. */
- const int reg = virtual_grf_reg_map[inst->dst.reg] + inst->dst.reg_offset;
+ if (inst->dst.file == GRF) {
+ const int reg =
+ virtual_grf_reg_map[inst->dst.reg] + inst->dst.reg_offset;
- /* Update our destination's current channel values. For a direct copy,
- * the value is the newly propagated source. Otherwise, we don't know
- * the new value, so clear it.
- */
- bool direct_copy = is_direct_copy(inst);
- for (int i = 0; i < 4; i++) {
- if (inst->dst.writemask & (1 << i)) {
- cur_value[reg][i] = direct_copy ? &inst->src[0] : NULL;
+ /* Update our destination's current channel values. For a direct copy,
+ * the value is the newly propagated source. Otherwise, we don't know
+ * the new value, so clear it.
+ */
+ bool direct_copy = is_direct_copy(inst);
+ for (int i = 0; i < 4; i++) {
+ if (inst->dst.writemask & (1 << i)) {
+ cur_value[reg][i] = direct_copy ? &inst->src[0] : NULL;
+ }
}
- }
- /* Clear the records for any registers whose current value came from
- * our destination's updated channels, as the two are no longer equal.
- */
- if (inst->dst.file == GRF) {
+ /* Clear the records for any registers whose current value came from
+ * our destination's updated channels, as the two are no longer equal.
+ */
if (inst->dst.reladdr)
memset(cur_value, 0, sizeof(cur_value));
else {