[PATCH 09/29] [arm] Correctly cost addition with a carry-in

Segher Boessenkool segher@kernel.crashing.org
Sat Oct 19 13:04:00 GMT 2019


On Fri, Oct 18, 2019 at 08:48:40PM +0100, Richard Earnshaw wrote:
> 
> The cost routine for Arm and Thumb2 was not recognising the idioms that
> describe the addition with carry, this results in the instructions
> appearing more expensive than they really are, which occasionally can lead
> to poor choices by combine.  Recognising all the possible variants is
> a little trickier than normal because the expressions can become complex
> enough that this is no single canonical from.

There also is the insn_cost hook, which especially for RISC-like targets
is a lot easier to define.


Segher



More information about the Gcc-patches mailing list