https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87763

--- Comment #7 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Richard Earnshaw from comment #6)
> (In reply to Wilco from comment #5)
> > (In reply to Segher Boessenkool from comment #4)
> > > (In reply to Wilco from comment #3)
> > > > IRA costing doesn't consider the possibility of a simple move being
> > > > removeable.
> > > 
> > > Not always, yeah (only if you have matching constraints, which are silly 
> > > to
> > > have for moves; IRA or LRA should do the work, not the machine 
> > > description).
> > 
> > Would it take this into account in the costs? I believe it doesn't.
> > 
> > > > Neither does it consider that some variants are more expensive
> > > > than others - use of '?' is the only way to mark more expensive 
> > > > variants.
> > > 
> > > ? and !, or ^ and $ if it only more expensive if it needs reloads.
> > > 
> > > > The example shown is fixed when I change the w=rZ variant to ?w=rZ in
> > > > movsi_aarch64.
> > > 
> > > Is it always more expensive than the other alternatives?  Then it *should*
> > > have "?" modifiers!
> > 
> > Today using '?' seems to be the only way to tell it to prefer certain
> > alternatives. However this is annoying given there are already separate
> > costs for moves between different register classes. So this means we end up
> > hardcoding microarchitecture costs in the md files instead of using the
> > existing cost hooks...
> 
> The '?' modifiers approach is not really suitable for any case where the
> cost might depend on the micro-architecture.  There's only one cost that can
> be applied this way, and if it doesn't suit all implementations, you're
> hosed.

Yes all you can say "this is slightly more expensive". Anyway if it solves
most/all the test failures then at least we're getting back to where we should
be.

Reply via email to