freedreno/ir3: fix coverity warning
authorRob Clark <robclark@freedesktop.org>
Thu, 2 Jun 2016 15:19:43 +0000 (11:19 -0400)
committerRob Clark <robclark@freedesktop.org>
Thu, 2 Jun 2016 19:44:07 +0000 (15:44 -0400)
CID 1362453

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3.c

index 1406856a4a0a782d35812fdda25bd853fd4264ba..a01df3bf6b332c7f4bb93344a084f225104c0a5f 100644 (file)
@@ -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));