]> git.ipfire.org Git - thirdparty/gcc.git/commit
[arm] Correctly cost addition with a carry-in
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Oct 2019 19:02:43 +0000 (19:02 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Oct 2019 19:02:43 +0000 (19:02 +0000)
commit4509f474ca4aef4d451631f8fae85676d5b0889e
treebc6d57abbdd9f82006e4b9f3d43b5b08b06d27c7
parent40155e195e90c4c87db1a5f7e2d1c173fbce70ef
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277172 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/arm/arm.c