]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ChangeLog
[arm] Early split addvdi4
[thirdparty/gcc.git] / gcc / ChangeLog
index 2f4906eb0c2b05995e398e14709d3fc2c46e73ab..8275411b671eee980fa73744bc41df07de0eb6df 100644 (file)
@@ -1,3 +1,266 @@
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.c (arm_select_cc_mode): Allow either the first
+       or second operand of the PLUS inside a DImode equality test to be
+       sign-extend when selecting CC_Vmode.
+       * config/arm/arm.md (addvdi4): Early-split the operation into SImode
+       instructions.
+       (addsi3_cin_vout_reg, addsi3_cin_vout_imm, addsi3_cin_vout_0): New
+       expand patterns.
+       (addsi3_cin_vout_reg_insn, addsi3_cin_vout_imm_insn): New patterns.
+       (addsi3_cin_vout_0): Likewise.
+       (adddi3_compareV): Delete.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (addsi3_compareV_reg_nosum): New insn.
+       (addsi3_compareV_imm_nosum): New insn.  Also add peephole2 patterns
+       to transform this back into the summation version when that leads
+       to smaller code.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (addv<mode>4): Delete.
+       (addvsi4): New pattern.  Handle immediate values that the architecture
+       supports.
+       (addvdi4): New pattern.
+       (addsi3_compareV): Rename to ...
+       (addsi3_compareV_reg): ... this.  Add constraints for thumb2 variants
+       and use COMPARE rather than NE.
+       (addsi3_compareV_imm): New pattern.
+       * config/arm/arm.c (arm_select_cc_mode): Return CC_Vmode for
+       a signed-overflow check.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm-modes.def (CC_ADC): New CC mode.
+       * config/arm/arm.c (arm_select_cc_mode): Detect selection of
+       CC_ADCmode.
+       (maybe_get_arm_condition_code): Handle CC_ADCmode.
+       * config/arm/arm.md (uaddvdi4): Early expansion of unsigned addition
+       with overflow.
+       (addsi3_cin_cout_reg, addsi3_cin_cout_imm, addsi3_cin_cout_0): New
+       expand patterns.
+       (addsi3_cin_cout_reg_insn, addsi3_cin_cout_0_insn): New insn patterns
+       (addsi3_cin_cout_imm_insn): Likewise.
+       (adddi3_compareC): Delete insn.
+       * config/arm/predicates.md (arm_carry_operation): Handle CC_ADCmode.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (adddi3): Call gen_addsi3_compare_op1.
+       * (uaddv<mode>4): Delete expansion pattern.
+       (uaddvsi4): New pattern.
+       (uaddvdi4): Likewise.
+       (addsi3_compareC): Delete pattern, change callers to use
+       addsi3_compare_op1.
+       (addsi3_compare_op1): No-longer anonymous.  Clean up constraints to
+       reduce the number of alternatives and re-work type attribute handling.
+       (addsi3_compare_op2): Clean up constraints to reduce the number of
+       alternatives and re-work type attribute handling.
+       (compare_addsi2_op0): Likewise.
+       (compare_addsi2_op1): Likewise.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm-modes.def (CC_NCV, CC_CZ): Delete CC modes.
+       * config/arm/arm.c (arm_select_cc_mode): Remove old selection code
+       for DImode operands.
+       (arm_gen_dicompare_reg): Remove unreachable expansion code.
+       (maybe_get_arm_condition_code): Remove support for CC_CZmode and
+       CC_NCVmode.
+       * config/arm/arm.md (arm_cmpdi_insn): Delete.
+       (arm_cmpdi_unsigned): Delete.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.c (arm_const_double_prefer_rsbs_rsc): New function.
+       (arm_canonicalize_comparison): For GT/LE/GTU/GEU, use the constant
+       unchanged only if that will be cheaper.
+       (arm_select_cc_mode): Recognize a swapped comparison that will
+       be regenerated using RSBS or RSCS.  Relax restriction on selecting
+       CC_RSBmode.
+       (arm_gen_dicompare_reg): Handle LE/GT/LEU/GEU comparisons against
+       a constant.
+       (arm_gen_compare_reg): Handle compare (CONST, X) when the mode
+       is CC_RSBmode.
+       (maybe_get_arm_condition_code): CC_RSBmode now returns the same codes
+       as CCmode.
+       * config/arm/arm.md (rsb_imm_compare_scratch): New pattern.
+       (rscsi3_<CC_EXTEND>out_scratch): New pattern.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm-modes.def (CC_NV, CC_B): New CC modes.
+       * config/arm/arm.c (arm_select_cc_mode): Recognize constructs that
+       need these modes.
+       (arm_gen_dicompare_reg): New code to early expand the sub-operations
+       of EQ, NE, LT, GE, LTU and GEU.
+       * config/arm/iterators.md (CC_EXTEND): New code attribute.
+       * config/arm/predicates.md (arm_adcimm_operand): New predicate..
+       * config/arm/arm.md (cmpsi3_carryin_<CC_EXTEND>out): New pattern.
+       (cmpsi3_imm_carryin_<CC_EXTEND>out): Likewise.
+       (cmpsi3_0_carryin_<CC_EXTEND>out): Likewise.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (cbranchdi4): Accept reg_or_int_operand for
+       operand 2.
+       (cstoredi4): Similarly, but for operand 3.
+       * config/arm/arm.c (arm_canoncialize_comparison): Allow
+       canonicalization of unsigned compares with a constant on Arm.
+       Prefer using const+1 and adjusting the comparison over swapping the
+       operands whenever the original constant was not valid.
+       (arm_gen_dicompare_reg): If Y is not a valid operand, force it to a
+       register here.
+       (arm_validize_comparison): Do not force invalid DImode operands to
+       registers here.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.c (arm_select_cc_mode): For DImode equality tests
+       return CC_Zmode if comparing against a constant where one word is
+       zero.
+       (arm_gen_compare_reg): Split DImode handling to ...
+       (arm_gen_dicompare_reg): ... here.  Handle equality comparisons
+       against simple constants.
+       * config/arm/arm.md (arm_cmpdi_zero): Delete pattern.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (subsi3_carryin_shift_alt): New pattern.
+       (rsbsi3_carryin_shift_alt): Likewise.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (negscc_borrow): New pattern.
+       (mov_negscc): Don't split if the insn would match negscc_borrow.
+       * config/arm/thumb2.md (thumb2_mov_negscc): Likewise.
+       (thumb2_mov_negscc_strict_it): Likewise.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.c (arm_insn_cost): New function.
+       (TARGET_INSN_COST): Override default definition.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.c (arm_rtx_costs_internal, case MINUS): Handle
+       borrow operations.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.c (strip_carry_operation): New function.
+       (arm_rtx_costs_internal, case PLUS): Handle addtion with carry-in
+       for SImode.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/predicates.md (arm_carry_operation): New special
+       predicate.
+       * config/arm/iterators.md (LTUGEU): Delete iterator.
+       (cnb): Delete code attribute.
+       (optab): Delete ltu and geu elements.
+       * config/arm/arm.md (addsi3_carryin): Renamed from
+       addsi3_carryin_<optab>.  Remove iterator and use arm_carry_operand.
+       (add0si3_carryin): Similarly, but from add0si3_carryin_<optab>.
+       (addsi3_carryin_alt2): Similarly, but from addsi3_carryin_alt2_<optab>.
+       (addsi3_carryin_clobercc): Similarly.
+       (addsi3_carryin_shift): Similarly.  Do not allow register shifts in
+       Thumb2 state.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (arm_subdi3): Delete insn.
+       (zextendsidi_negsi, negdi_extendsidi): Delete insn_and_split.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm-modes.def (CC_RSB): New CC mode.
+       * config/arm/predicates.md (arm_borrow_operation): Handle CC_RSBmode.
+       * config/arm/arm.c (arm_select_cc_mode): Detect when we should
+       return CC_RSBmode.
+       (maybe_get_arm_condition_code): Handle CC_RSBmode.
+       * config/arm/arm.md (subsi3_carryin): Make this pattern available to
+       expand.
+       (subdi3): Rewrite to early-expand the sub-operations.
+       (rsb_im_compare): New pattern.
+       (negdi2): Delete.
+       (negdi2_insn): Delete.
+       (arm_negsi2): Correct type attribute to alu_imm.
+       (negsi2_0compare): New insn pattern.
+       (negsi2_carryin): New insn pattern.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (addsi3_carryin_alt2): Use arm_not_operand for
+       operand 2.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (addsi3_carryin_shift_<optab>): Reorder operands
+       to match canonical form.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm.md (zero_extend<mode>di2): Convert to define_expand.
+       (extend<mode>di2): Likewise.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * config/arm/arm-protos.h (arm_decompose_di_binop): New prototype.
+       * config/arm/arm.c (arm_decompose_di_binop): New function.
+       * config/arm/arm.md (adddi3): Also accept any const_int for op2.
+       If not generating Thumb-1 code, decompose the operation into 32-bit
+       pieces.
+       * add0si_carryin_<optab>: New pattern.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
+       * arm.md (adddi3): Only accept register operands.
+       (arm_adddi3): Convert to simple insn with no split.  Do not accept
+       constants.
+       (adddi_sesidi_di): Delete patern.
+       (adddi_zesidi_di): Likewise.
+       (uaddv<mode>4): Use LTU as condition for branch.
+       (adddi3_compareV): Convert to simple insn with no split.
+       (addsi3_compareV_upper): Delete pattern.
+       (adddi3_compareC): Convert to simple insn with no split.  Correct
+       flags setting expression.
+       (addsi3_compareC_upper): Delete pattern.
+       (addsi3_compareC): Correct flags setting expression.
+       (subdi3_compare1): Convert to simple insn with no split.
+       (subsi3_carryin_compare): Delete pattern.
+       (arm_subdi3): Convert to simple insn with no split.
+       (subdi_zesidi): Delete pattern.
+       (subdi_di_sesidi): Delete pattern.
+       (subdi_zesidi_di): Delete pattern.
+       (subdi_sesidi_di): Delete pattern.
+       (subdi_zesidi_zesidi): Delete pattern.
+       (negvdi3): Use s_register_operand.
+       (negdi2_compare): Convert to simple insn with no split.
+       (negdi2_insn): Likewise.
+       (negsi2_carryin_compare): Delete pattern.
+       (negdi_zero_extendsidi): Delete pattern.
+       (arm_cmpdi_insn): Convert to simple insn with no split.
+       (negdi2): Don't call gen_negdi2_neon.
+       * config/arm/neon.md (adddi3_neon): Delete pattern.
+       (subdi3_neon): Delete pattern.
+       (negdi2_neon): Delete pattern.
+       (splits for negdi2_neon): Delete splits.
+
+2019-10-18  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/92153
+       * ggc-page.c (release_pages): Read g->alloc_size before free rather
+       than after it.
+
+2019-10-18  Andre Vieira  <andre.simoesdiasvieira@arm.com>
+
+       * config/arm/t-multilib: Add rule to regenerate mutlilib header file
+       with any change to t-multilib, t-aprofile and t-rmprofile.  Also add
+       new multilib variants and new mappings.
+
 2019-10-18  Georg-Johann Lay  <avr@gjlay.de>
 
        PR target/86040