Was supposed to be a '+', otherwise we end up with a negative offset and
choosing registers below the assigned range.
This seems to fix the scheduling mystery "solved" by adding in extra
delay slots.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
/* assigner must be alu: */
if (is_flow(consumer) || is_sfu(consumer) || is_tex(consumer)) {
- return 8;
+ return 6;
} else if ((consumer->category == 3) &&
is_mad(consumer->opc) && (n == 2)) {
/* special case, 3rd src to cat3 not required on first cycle */
- return 2;
+ return 1;
} else {
- return 5;
+ return 3;
}
}
{
struct ra_calc_visitor *c = ra_calc_visitor(v);
unsigned srcn = ir3_instr_regno(instr, reg) - 1;
- c->a.off -= srcn;
+ c->a.off += srcn;
c->a.num += srcn;
c->a.num = MAX2(c->a.num, instr->regs_count - 1);
}