return (inst->opcode == BRW_OPCODE_MOV &&
!inst->predicate &&
inst->dst.file == VGRF &&
+ inst->dst.offset % REG_SIZE == 0 &&
!inst->dst.reladdr &&
!inst->src[0].reladdr &&
(inst->dst.type == inst->src[0].type ||
return false;
return regions_overlap(*src, REG_SIZE, inst->dst, inst->size_written) &&
- inst->dst.writemask & (1 << BRW_GET_SWZ(src->swizzle, ch));
+ (inst->dst.offset != src->offset ||
+ inst->dst.writemask & (1 << BRW_GET_SWZ(src->swizzle, ch)));
}
static bool
inst->src[i].reladdr)
continue;
- /* We only handle single-register copies. */
- if (inst->size_read(i) != REG_SIZE)
+ /* We only handle register-aligned single GRF copies. */
+ if (inst->size_read(i) != REG_SIZE ||
+ inst->src[i].offset % REG_SIZE)
continue;
const unsigned reg = (alloc.offsets[inst->src[i].nr] +