From: Rob Clark Date: Thu, 2 Jun 2016 15:19:43 +0000 (-0400) Subject: freedreno/ir3: fix coverity warning X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=27a97097e1a6d8f0a29393b2fcc6fdb0a500bf92;p=mesa.git freedreno/ir3: fix coverity warning CID 1362453 Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/ir3/ir3.c b/src/gallium/drivers/freedreno/ir3/ir3.c index 1406856a4a0..a01df3bf6b3 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3.c +++ b/src/gallium/drivers/freedreno/ir3/ir3.c @@ -428,12 +428,14 @@ static int emit_cat5(struct ir3_instruction *instr, void *ptr, iassert(!((dst->flags ^ type_flags(instr->cat5.type)) & IR3_REG_HALF)); + assume(src1 || !src2); + assume(src2 || !src3); + if (src1) { cat5->full = ! (src1->flags & IR3_REG_HALF); cat5->src1 = reg(src1, info, instr->repeat, IR3_REG_HALF); } - if (instr->flags & IR3_INSTR_S2EN) { if (src2) { iassert(!((src1->flags ^ src2->flags) & IR3_REG_HALF));