On 1/25/24 6:16 PM, HAO CHEN GUI wrote:
Hi,
   This patch replaces rtx_cost with insn_cost in forward propagation.
In the PR, one constant vector should be propagated and replace a
pseudo in a store insn if we know it's a duplicated constant vector.
It reduces the insn cost but not rtx cost. In this case, the kind of
destination operand (memory or pseudo) decides the cost and rtx cost
can't reflect it.

   The test case is added in the second target specific patch.

   Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no
regressions. Is it OK for next stage 1?

Thanks
Gui Haochen


ChangeLog
fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern

gcc/
        PR target/113325
        * fwprop.cc (try_fwprop_subst_pattern): Replace rtx_cost with
        insn_cost.
Testcase?  I don't care of it's ppc specific.

I think we generally want to move from rtx_cost to insn_cost, so I think the change itself is fine. We just want to make sure a test covers the change in some manner.

Also note this a change to generic code and could likely trigger failures on various targets that have assembler scanning tests. So once you've got a testcase and the full patch is ack'd we'll need to watch closely for regressions reported on other targets.


So ACK'd once you add a testcase.

Jeff

Reply via email to