From: Rob Clark Date: Sun, 5 Jul 2015 23:53:10 +0000 (-0400) Subject: freedreno/ir3/ra: fix failed assert for a0/p0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a1a6f007823f203755fb54a1f3b7f53ae6cbfef0;p=mesa.git freedreno/ir3/ra: fix failed assert for a0/p0 The address and predicate register are special, they don't get assigned in RA. So do a better job of ignoring them rather than hitting later asserts. Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/ir3/ir3_ra.c b/src/gallium/drivers/freedreno/ir3/ir3_ra.c index de48ecfe280..eaf3b3c35e8 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_ra.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_ra.c @@ -469,6 +469,11 @@ ra_block_find_definers(struct ir3_ra_ctx *ctx, struct ir3_block *block) struct ir3_ra_instr_data *id = &ctx->instrd[instr->ip]; if (instr->regs_count == 0) continue; + /* couple special cases: */ + if (writes_addr(instr) || writes_pred(instr)) { + id->cls = -1; + continue; + } id->defn = get_definer(ctx, instr, &id->sz, &id->off); id->cls = size_to_class(id->sz, is_half(id->defn)); }