diff --git a/src/panfrost/bifrost/bi_opt_cse.c b/src/panfrost/bifrost/bi_opt_cse.c index bf1122e61cb..d33d2d1a441 100644 --- a/src/panfrost/bifrost/bi_opt_cse.c +++ b/src/panfrost/bifrost/bi_opt_cse.c @@ -126,7 +126,10 @@ instr_can_cse(const bi_instr *I) break; } - if (bi_opcode_props[I->op].message) + /* Be conservative about which message-passing instructions we CSE, + * since most are not pure even within a thread. + */ + if (bi_opcode_props[I->op].message && I->op != BI_OPCODE_LEA_BUF_IMM) return false; if (I->branch_target)