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

guan jian via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 15 23:25:54 PDT 2025


rez5427 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.

Let me check this.

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


More information about the cfe-commits mailing list