From 6e6e71ddf9e7356162206ace2009011a509527ea Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Fri, 5 Mar 2021 13:18:02 +0100 Subject: [PATCH] broadcom/compiler: fix flags check for ldvary merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were checking that the previous instruction doesn't write flags, but we also need to check it doesn't read them. Fixes: 1784dd22a32 ('broadcom/compiler: pipeline smooth ldvary sequences') Reviewed-by: Alejandro PiƱeiro Part-of: --- src/broadcom/compiler/qpu_schedule.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c index 90dba7f48b0..bc0ade2cbf0 100644 --- a/src/broadcom/compiler/qpu_schedule.c +++ b/src/broadcom/compiler/qpu_schedule.c @@ -1644,6 +1644,8 @@ fixup_pipelined_ldvary(struct v3d_compile *c, */ if (v3d_qpu_writes_flags(&prev->qpu)) return false; + if (v3d_qpu_reads_flags(&prev->qpu)) + return false; /* Move the ldvary to the previous instruction and remove it from the * current one.