Mesa (master): freedreno/ir3: treat high vs low reg as conversion

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 24 20:38:19 UTC 2019


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

Author: Rob Clark <robdclark at chromium.org>
Date:   Tue Oct 15 16:08:26 2019 -0700

freedreno/ir3: treat high vs low reg as conversion

This avoids copy-propagating a high register into an instruction which
cannot consume it.

Signed-off-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>

---

 src/freedreno/ir3/ir3.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h
index 4fc65a90c92..7eeb8b44336 100644
--- a/src/freedreno/ir3/ir3.h
+++ b/src/freedreno/ir3/ir3.h
@@ -646,13 +646,19 @@ static inline bool is_same_type_mov(struct ir3_instruction *instr)
 	case OPC_MOV:
 		if (instr->cat1.src_type != instr->cat1.dst_type)
 			return false;
+		/* If the type of dest reg and src reg are different,
+		 * it shouldn't be considered as same type mov
+		 */
+		if (!is_same_type_reg(instr->regs[0], instr->regs[1]))
+			return false;
 		break;
 	case OPC_ABSNEG_F:
 	case OPC_ABSNEG_S:
 		if (instr->flags & IR3_INSTR_SAT)
 			return false;
 		/* If the type of dest reg and src reg are different,
-		 * it shouldn't be considered as same type mov */
+		 * it shouldn't be considered as same type mov
+		 */
 		if (!is_same_type_reg(instr->regs[0], instr->regs[1]))
 			return false;
 		break;




More information about the mesa-commit mailing list