> From: Segher Boessenkool <seg...@kernel.crashing.org>
> Date: Fri, 17 Jul 2020 02:05:19 +0200

> On Tue, Jul 14, 2020 at 04:33:42PM -0500, Segher Boessenkool wrote:
> > > If combine only did lower-cost combinations (perhaps with
> > > Richard Sandifords lower-size-when-tied suggestion), I guess
> > > this wouldn't happen. 0:-)
> > 
> > And we would regress (a LOT).
>
> Like this.  C0 is an unmodified compiler.  C1 is with the single_set
> modification to is_just_move I committed a minute ago (84c5396d4bdb).
> C2 is with this patch:

Thanks for doing the numbers.

Most targets are of course keyed on the cheaper=same_cost
behaviour of combine.c.  Just try fixing any obvious general
cost-related bug!  I mentioned running the test-suites for each
of x86_64-linux, aarch64-linux and ppc64le-linux (your numbers
confirm my observation) but didn't mention that I *did* inspect
one case, IIRC the first regression for x86_64, but decided to
break off less than half-way down the rabbit-hole with no
obvious target-cost tweak.

I'm considering updating my suggested patch with something
implementing "INSN_COST(log_link) = 1", but don't hold your
breath.

brgds, H-P

Reply via email to