diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 777dbaf5ae6..eef34365ef9 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -2297,11 +2297,6 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr) if (sz == 16 && comps == 1) dst.swizzle = BI_SWIZZLE_H00; - if (!instr->dest.dest.is_ssa) { - for (unsigned i = 0; i < comps; ++i) - assert(instr->dest.write_mask); - } - /* First, match against the various moves in NIR. These are * special-cased because they can operate on vectors even after * lowering ALU to scalar. For Bifrost, bi_alu_src_index assumes the @@ -4821,8 +4816,6 @@ bi_gather_texcoords(nir_builder *b, nir_instr *instr, void *data) return false; nir_src src = tex->src[coord_idx].src; - assert(src.is_ssa); - nir_ssa_scalar x = nir_ssa_scalar_resolved(src.ssa, 0); nir_ssa_scalar y = nir_ssa_scalar_resolved(src.ssa, 1); diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index e4b5759bde3..97acbb0d0bc 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -943,25 +943,19 @@ bi_temp_reg(bi_context *ctx) static inline bi_index bi_src_index(nir_src *src) { - if (nir_src_is_const(*src) && nir_src_bit_size(*src) <= 32) + if (nir_src_is_const(*src) && nir_src_bit_size(*src) <= 32) { return bi_imm_u32(nir_src_as_uint(*src)); - else if (src->is_ssa) + } else { + assert(src->is_ssa); return bi_get_index(src->ssa->index, false, 0); - else { - assert(!src->reg.indirect); - return bi_get_index(src->reg.reg->index, true, 0); } } static inline bi_index bi_dest_index(nir_dest *dst) { - if (dst->is_ssa) - return bi_get_index(dst->ssa.index, false, 0); - else { - assert(!dst->reg.indirect); - return bi_get_index(dst->reg.reg->index, true, 0); - } + assert(dst->is_ssa); + return bi_get_index(dst->ssa.index, false, 0); } static inline unsigned