freedreno/ir3: Set IR3_REG_HALF flag on src as well in immediate MOV
authorKristian H. Kristensen <hoegsberg@google.com>
Fri, 10 Jan 2020 21:59:43 +0000 (13:59 -0800)
committerKristian H. Kristensen <hoegsberg@google.com>
Fri, 7 Feb 2020 17:51:25 +0000 (09:51 -0800)
This lets is_same_type_reg() recognize that the dst and src of the
immediate MOV are the same and unblocks fp16 constant propagation.

Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737>

src/freedreno/ir3/ir3.h

index f1c15ca2519e47f359eb9e858419fe742c5ad64a..6c286dcd7dd16a496af34481a5e29849c1bd9f55 100644 (file)
@@ -1188,7 +1188,7 @@ create_immed_typed(struct ir3_block *block, uint32_t val, type_t type)
        mov->cat1.src_type = type;
        mov->cat1.dst_type = type;
        __ssa_dst(mov)->flags |= flags;
-       ir3_reg_create(mov, 0, IR3_REG_IMMED)->uim_val = val;
+       ir3_reg_create(mov, 0, IR3_REG_IMMED | flags)->uim_val = val;
 
        return mov;
 }