panfrost: Fix remaining release-build warnings.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462>
This commit is contained in:
Eric Anholt
2020-08-25 10:15:27 -07:00
committed by Marge Bot
parent ecab580d48
commit 4c24c8239a
8 changed files with 14 additions and 16 deletions

View File

@@ -1476,7 +1476,7 @@ bi_pack_add_tex_compact(bi_clause *clause, bi_instruction *ins, bi_registers *re
static unsigned
bi_pack_add_select(bi_instruction *ins, bi_registers *regs)
{
unsigned size = nir_alu_type_get_type_size(ins->src_types[0]);
ASSERTED unsigned size = nir_alu_type_get_type_size(ins->src_types[0]);
assert(size == 16);
unsigned swiz = (ins->swizzle[0][0] | (ins->swizzle[1][0] << 1));
@@ -1591,7 +1591,7 @@ static unsigned
bi_pack_add_cmp(bi_instruction *ins, bi_registers *regs)
{
nir_alu_type Tl = ins->src_types[0];
nir_alu_type Tr = ins->src_types[1];
ASSERTED nir_alu_type Tr = ins->src_types[1];
nir_alu_type Bl = nir_alu_type_get_base_type(Tl);
if (Bl == nir_type_uint || Bl == nir_type_int) {
@@ -1827,7 +1827,7 @@ bi_pack_constants(bi_context *ctx, bi_clause *clause,
{
/* After these two, are we done? Determines tag */
bool done = clause->constant_count <= (index + 2);
bool only = clause->constant_count <= (index + 1);
ASSERTED bool only = clause->constant_count <= (index + 1);
/* Is the constant we're packing for a branch? */
bool branches = clause->branch_constant && done;

View File

@@ -285,7 +285,7 @@ bi_print_instruction(bi_instruction *ins, FILE *fp)
fprintf(fp, "%s", bi_round_mode_name(ins->roundmode));
fprintf(fp, " ");
bool succ = bi_print_dest_index(fp, ins, ins->dest);
ASSERTED bool succ = bi_print_dest_index(fp, ins, ins->dest);
assert(succ);
if (ins->dest_offset)

View File

@@ -188,7 +188,7 @@ bi_schedule(bi_context *ctx)
/* Check for scheduling restrictions */
bool can_fma = props & BI_SCHED_FMA;
bool can_add = props & BI_SCHED_ADD;
ASSERTED bool can_add = props & BI_SCHED_ADD;
can_fma &= !bi_ambiguous_abs(ins);
can_fma &= !bi_icmp(ins);

View File

@@ -342,8 +342,7 @@ static uint64_t get_const(uint64_t *consts, struct bifrost_regs srcs)
imm = consts[5];
break;
default:
assert(0);
break;
unreachable("bad imm");
}
return imm | low_bits;
}

View File

@@ -68,9 +68,8 @@ __gen_uint(uint64_t v, uint32_t start, uint32_t end)
static inline uint32_t
__gen_sint(int32_t v, uint32_t start, uint32_t end)
{
const int width = end - start + 1;
#ifndef NDEBUG
const int width = end - start + 1;
if (width < 64) {
const int64_t max = (1ll << (width - 1)) - 1;
const int64_t min = -(1ll << (width - 1));

View File

@@ -858,8 +858,8 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
/* Should we swap arguments? */
bool flip_src12 = false;
unsigned src_bitsize = nir_src_bit_size(instr->src[0].src);
unsigned dst_bitsize = nir_dest_bit_size(*dest);
ASSERTED unsigned src_bitsize = nir_src_bit_size(instr->src[0].src);
ASSERTED unsigned dst_bitsize = nir_dest_bit_size(*dest);
enum midgard_roundmode roundmode = MIDGARD_RTE;
@@ -1836,7 +1836,7 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
else if (combined)
rt = MIDGARD_ZS_RT;
else
assert(0);
unreachable("bad rt");
unsigned reg_z = ~0, reg_s = ~0;
if (combined) {

View File

@@ -240,7 +240,7 @@ mir_pack_swizzle(unsigned mask, unsigned *swizzle,
for (unsigned c = (dest_up ? 4 : 0); c < (dest_up ? 8 : 4); ++c) {
unsigned v = swizzle[c];
bool t_upper = v > 3;
ASSERTED bool t_upper = v > 3;
/* Ensure we're doing something sane */
@@ -419,7 +419,7 @@ mir_pack_ldst_mask(midgard_instruction *ins)
for (unsigned i = 0; i < 4; ++i) {
/* Make sure we're duplicated */
bool u = (ins->mask & (1 << (2*i + 0))) != 0;
bool v = (ins->mask & (1 << (2*i + 1))) != 0;
ASSERTED bool v = (ins->mask & (1 << (2*i + 1))) != 0;
assert(u == v);
packed |= (u << i);

View File

@@ -116,7 +116,7 @@ set_class(unsigned *classes, unsigned node, unsigned class)
/* Special register classes impose special constraints on who can read their
* values, so check that */
static bool
static bool ASSERTED
check_read_class(unsigned *classes, unsigned tag, unsigned node)
{
/* Non-nodes are implicitly ok */
@@ -137,7 +137,7 @@ check_read_class(unsigned *classes, unsigned tag, unsigned node)
}
}
static bool
static bool ASSERTED
check_write_class(unsigned *classes, unsigned tag, unsigned node)
{
/* Non-nodes are implicitly ok */