diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2019-10-22 13:19:15 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2019-10-22 13:19:15 +0000 |
commit | 2e30cb8395130982b8b28a4eb42814f4da1fb6d2 (patch) | |
tree | bc2e47c87c976dfbcb205370a614fe10b10bc2b8 /gcc/fortran/decl.c | |
parent | b747c183714a5d68da8037d8b705a8bc67f11bac (diff) | |
download | gcc-2e30cb8395130982b8b28a4eb42814f4da1fb6d2.zip gcc-2e30cb8395130982b8b28a4eb42814f4da1fb6d2.tar.gz gcc-2e30cb8395130982b8b28a4eb42814f4da1fb6d2.tar.bz2 |
[arm] Match subtraction from carry_operation
On Arm we have both carry and borrow operations, but borrow is
essentially '~carry'. Of course, with boolean logic ~carry is also
1-carry.
GCC transforms
(1 - X - LTU (cc, 0))
into
(GEU (cc, 0) - X)
Now the former matches a real insn in Arm state, using the RSC
instruction with #1 as the immediate, but we currently do not
recognize the canonicalized form. Nevertheless, given the above
logic, this turns out to be quite straight forward as the original
expression matches arm_borrow_operation and the revised form can be
used with arm_carry_operation. Since we match this new pattern we
also update rtx_costs to handle it.
* config/arm/arm.md (rsbsi_carryin_reg): New pattern.
* config/arm/arm.c (arm_rtx_costs_internal, case MINUS): Handle
subtraction from a carry operation.
From-SVN: r277290
Diffstat (limited to 'gcc/fortran/decl.c')
0 files changed, 0 insertions, 0 deletions