[clang] [llvm] [RegisterCoalescer] Improve register allocation for return values by limiting rematerialization (PR #163047)

Kai Luo via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 15 23:02:59 PDT 2025


bzEq wrote:

> Machine CSE is before this register coalescer, Machine CSE will see something like:
> ```
>      li	a2, 42
>      a0 = copy a2
> ```
> So Machine CSE will not eliminate this pattern.

IIRC, MachineCSE will try copy propagation. Looks failing in this case. Maybe we should find out why it fails. 

https://github.com/llvm/llvm-project/pull/163047


More information about the llvm-commits mailing list