On 11/3/26 1:16 PM, Derhaeg, Michiel wrote:
Hi Jeff,
I'm aware of the restriction. But this is not the place to tackle that
problem. THe work from Artimey a year or so ago will scurry around and
find the two fusible insns for this case and bring them together late in
RTL pipeline. If that's not working, then you should debug that
problem,
Artemiy's dep_fusion pass was introduced to move insn's together where prev's
results' only use is curr. e.g. ´slli rd,rs; srli rd,rd´ or ´mul rd,rs1,rs2; add
rd,rd,rs3´. This doesn't apply here as both instructions share inputs but are
unrelated in their outputs.
I missed that nugget. Yes, if there's no data dependency between the
pair, then Artemiy's work doesn't directly help. Lack of data
dependency makes your case much more like load/store pairs.
Perhaps Jin Ma's riscv_sched_reorder_fusion should be extended to handle fusible
pairs that are presented in the wrong order in the ready list to be able to
match.
That's probably the best path forward that I immediately see.
Jeff