Mesa (master): freedreno/ir3: Set IR3_REG_HALF flag on src as well in immediate MOV

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 7 18:19:36 UTC 2020


Module: Mesa
Branch: master
Commit: d55dfef78237380d3734f2341818daa299a7f330
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d55dfef78237380d3734f2341818daa299a7f330

Author: Kristian H. Kristensen <hoegsberg at google.com>
Date:   Fri Jan 10 13:59:43 2020 -0800

freedreno/ir3: Set IR3_REG_HALF flag on src as well in immediate MOV

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 at google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737>

---

 src/freedreno/ir3/ir3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h
index f1c15ca2519..6c286dcd7dd 100644
--- a/src/freedreno/ir3/ir3.h
+++ b/src/freedreno/ir3/ir3.h
@@ -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;
 }



More information about the mesa-commit mailing list