*/
if (!can_use_scratch_for_source(inst, i, inst->src[i].nr)) {
spill_costs[inst->src[i].nr] += loop_scale;
- if (inst->src[i].reladdr)
+ if (inst->src[i].reladdr ||
+ inst->src[i].offset % REG_SIZE != 0)
no_spill[inst->src[i].nr] = true;
}
}
if (inst->dst.file == VGRF) {
spill_costs[inst->dst.nr] += loop_scale;
- if (inst->dst.reladdr)
+ if (inst->dst.reladdr || inst->dst.offset % REG_SIZE != 0)
no_spill[inst->dst.nr] = true;
}
dst_reg temp, src_reg orig_src,
int base_offset)
{
+ assert(orig_src.offset % REG_SIZE == 0);
int reg_offset = base_offset + orig_src.offset / REG_SIZE;
src_reg index = get_scratch_offset(block, inst, orig_src.reladdr,
reg_offset);
vec4_visitor::emit_scratch_write(bblock_t *block, vec4_instruction *inst,
int base_offset)
{
+ assert(inst->dst.offset % REG_SIZE == 0);
int reg_offset = base_offset + inst->dst.offset / REG_SIZE;
src_reg index = get_scratch_offset(block, inst, inst->dst.reladdr,
reg_offset);