[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
Showing
Please
register
or
sign in
to comment