Issue 76779
Summary [RISCV] Missed macrofusion due to bad register allocation
Labels
Assignees
Reporter topperc
    LUI+ADDI macrofusion depends on the LUI instruction and the ADDI instruction writing to the same register. But register allocation may not guarantee this. The LUI may get assigned a register from allocation order while the ADDI gets assigned a register based on a constraint from a later instruction. Or the ADDI could have to pick a register to avoid the LUI register being clobbered before the ADDI result is used.

Here's a simple example where fusion fails https://godbolt.org/z/5bxz5W73T

cc: @preames @wangpc-pp 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to