Re: [PATCH V2] Fix wrong cost of MEM when addr is a lea.

2024-06-26 Thread Uros Bizjak
On Thu, Jun 27, 2024 at 5:57 AM liuhongt wrote: > > > But rtx_cost invokes targetm.rtx_cost which allows to avoid that > > recursive processing at any level. You're dealing with MEM [addr] > > here, so why's rtx_cost (addr, Pmode, MEM, 0, speed) not always > > the best way to deal with this? Sin

Re: [PATCH V2] Fix wrong cost of MEM when addr is a lea.

2024-06-26 Thread Richard Biener
On Thu, Jun 27, 2024 at 5:57 AM liuhongt wrote: > > > But rtx_cost invokes targetm.rtx_cost which allows to avoid that > > recursive processing at any level. You're dealing with MEM [addr] > > here, so why's rtx_cost (addr, Pmode, MEM, 0, speed) not always > > the best way to deal with this? Sin

[PATCH V2] Fix wrong cost of MEM when addr is a lea.

2024-06-26 Thread liuhongt
> But rtx_cost invokes targetm.rtx_cost which allows to avoid that > recursive processing at any level. You're dealing with MEM [addr] > here, so why's rtx_cost (addr, Pmode, MEM, 0, speed) not always > the best way to deal with this? Since this is the MEM [addr] case > we know it's not LEA, no?