[arm] Correctly cost addition with a carry-in
commit0a67306e3cc2adfe0ef2fe313a86f57141ab57b2
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 18 Oct 2019 19:02:43 +0000 (18 19:02 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 18 Oct 2019 19:02:43 +0000 (18 19:02 +0000)
treebc6d57abbdd9f82006e4b9f3d43b5b08b06d27c7
parent1e271beeec163b124eb424c0c9918b045e289c06
[arm] Correctly cost addition with a carry-in

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.

* config/arm/arm.c (strip_carry_operation): New function.
(arm_rtx_costs_internal, case PLUS): Handle addtion with carry-in
for SImode.

From-SVN: r277172
gcc/ChangeLog
gcc/config/arm/arm.c