Re: [PATCH 2/2] RISC-V: Optimize the cost of the LO_SUM expression.

2024-09-18 Thread Jeff Law
On 9/16/24 2:11 AM, Xianmiao Qu wrote: Currently, the cost of the LO_SUM expression is based on the cost of calculating the first subexpression. And that's probably the real bug here. THe first subexpression is typically going to be a REG and is not interesting from a costing standpoint. W

[PATCH 2/2] RISC-V: Optimize the cost of the LO_SUM expression.

2024-09-16 Thread Xianmiao Qu
Currently, the cost of the LO_SUM expression is based on the cost of calculating the first subexpression. When the first subexpression is a register, the cost result will be zero. It seems a bit unreasonable for a SET expression to have a zero cost when its source is LO_SUM. Moreover, having a cost