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 <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16585>
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);
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));
+}