ir3/ra: Add missing asserts to ra_push_interval()

This would've caught the previous issue earlier. We checked that the
physreg made sense when inserting via ra_file_insert() but not
ra_push_interval() which is used for live-range splitting.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13818>
This commit is contained in:
Connor Abbott 2021-11-15 12:53:01 +01:00 committed by Marge Bot
parent 9d88b98b08
commit 29d3889bbb

View file

@ -718,6 +718,10 @@ ra_push_interval(struct ra_ctx *ctx, struct ra_file *file,
interval->physreg_start = dst;
interval->physreg_end = dst + removed->size;
assert(interval->physreg_end <= file->size);
if (interval->interval.reg->flags & IR3_REG_HALF)
assert(interval->physreg_end <= RA_HALF_SIZE);
ir3_reg_interval_reinsert(&file->reg_ctx, &interval->interval);
}