From: Alyssa Rosenzweig Date: Wed, 18 May 2022 15:02:53 +0000 (-0400) Subject: pan/bi: +JUMP can't read same-cycle temp X-Git-Tag: upstream/22.3.5~8616 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8882ee11503689c453912d1462208e95339c262;p=platform%2Fupstream%2Fmesa.git pan/bi: +JUMP can't read same-cycle temp Minor ISA detail missed in the Bifrost scheduler. I hit this in an early version of this series (where a move feeding into a blend shader return was not coalesced). Let's get it fixed in the scheduler. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index a3e176b..8bd349c 100644 --- a/src/panfrost/bifrost/bi_schedule.c +++ b/src/panfrost/bifrost/bi_schedule.c @@ -787,6 +787,10 @@ bi_reads_t(bi_instr *ins, unsigned src) case BI_OPCODE_BLEND: return src != 2 && src != 3; + /* +JUMP can't read the offset from T */ + case BI_OPCODE_JUMP: + return false; + /* Else, just check if we can read any temps */ default: return bi_reads_temps(ins, src); diff --git a/src/panfrost/bifrost/test/test-scheduler-predicates.cpp b/src/panfrost/bifrost/test/test-scheduler-predicates.cpp index 65d700f..7b7e138 100644 --- a/src/panfrost/bifrost/test/test-scheduler-predicates.cpp +++ b/src/panfrost/bifrost/test/test-scheduler-predicates.cpp @@ -150,3 +150,9 @@ TEST_F(SchedulerPredicates, RestrictionsOnFAddV2F16) ASSERT_FALSE(bi_can_fma(fadd)); ASSERT_FALSE(bi_can_add(fadd)); } + +TEST_F(SchedulerPredicates, BranchOffset) +{ + bi_instr *jump = bi_jump(b, TMP()); + ASSERT_FALSE(bi_reads_t(jump, 0)); +}