[arm] clean up alu+shift patterns
My DImode arithmetic patches introduced a bug on thumb2 where we could generate a register controlled shift into an ALU operation. In fairness the bug was always present, but latent. As part of cleaning this up (and auditing to ensure I've caught them all this time) I've gone through all the shift generating patterns in the MD files and cleaned them up, reducing some duplicate patterns between the arm and thumb2 descriptions where we can now share the same pattern. In some cases we were missing the shift attribute; in most cases I've eliminated an ugly attribute setting using the fact that we normally need separate alternatives for shift immediate and shift reg to simplify the logic. * config/arm/iterators.md (t2_binop0): Fix typo in comment. * config/arm/arm.md (addsi3_carryin_shift): Simplify selection of the type attribute. (subsi3_carryin_shift): Separate into register and constant controlled alternatives. Use shift_amount_operand for operand 4. Set shift attribute and simplify type attribute. (subsi3_carryin_shift_alt): Likewise. (rsbsi3_carryin_shift): Likewise. (rsbsi3_carryin_shift_alt): Likewise. (andsi_not_shiftsi_si): Enable for TARGET_32BIT. Separate constant and register controlled shifts into distinct alternatives. (andsi_not_shiftsi_si_scc_no_reuse): Likewise. (andsi_not_shiftsi_si_scc): Likewise. (arm_cmpsi_negshiftsi_si): Likewise. (not_shiftsi): Remove redundant M constraint from alternative 1. (not_shiftsi_compare0): Likewise. (arm_cmpsi_insn): Remove redundant alternative 2. (cmpsi_shift_swp): Likewise. (sub_shiftsi): Likewise. (sub_shiftsi_compare0_scratch): Likewise. * config/arm/thumb2.md (thumb_andsi_not_shiftsi_si): Delete pattern. (thumb2_cmpsi_neg_shiftsi): Likewise. From-SVN: r277262
Showing
Please
register
or
sign in
to comment