From 563d98c5c64d5ed2ff4be77d0f4afacd42989f30 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 14 Jul 2022 11:02:36 -0400 Subject: [PATCH] pan/bi: Don't reorder phis in pre-RA scheduling Treat them like preloads which are also required to be at the start of the block. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_pressure_schedule.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/bi_pressure_schedule.c b/src/panfrost/bifrost/bi_pressure_schedule.c index 5518ac5fc57..ff8a2aebc08 100644 --- a/src/panfrost/bifrost/bi_pressure_schedule.c +++ b/src/panfrost/bifrost/bi_pressure_schedule.c @@ -204,7 +204,9 @@ create_dag(bi_context *ctx, bi_block *block, void *memctx) add_dep(node, memory_store); memory_load = node; memory_store = node; - } else if (I->op == BI_OPCODE_MOV_I32 && I->src[0].type == BI_INDEX_REGISTER) { + } else if ((I->op == BI_OPCODE_PHI) || + (I->op == BI_OPCODE_MOV_I32 && + I->src[0].type == BI_INDEX_REGISTER)) { preload = node; } }