This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][ARM] Use mov_imm type for movw operations consistently
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Fri, 30 May 2014 09:27:11 +0100
- Subject: Re: [PATCH][ARM] Use mov_imm type for movw operations consistently
- Authentication-results: sourceware.org; auth=none
- References: <5387514E dot 6080303 at arm dot com>
On 05/29/14 16:25, Kyrill Tkachov wrote:
I noticed that in some of our move patterns the movw instruction is given the mov_reg type rather than the
mov_imm type that all other uses of movw have. This patch fixes that.
Scanning through our pipeline descriptions I see that mov_imm is treated the same way as mov_reg everywhere anyway. In the Cortex-A7 description we do have a bit more complicated logic:
;; ALU instruction with an immediate operand can dual-issue.
(define_insn_reservation "cortex_a7_alu_imm" 2
(and (eq_attr "tune" "cortexa7")
(ior (eq_attr "type" "adr,alu_imm,alus_imm,logic_imm,logics_imm,\
(and (eq_attr "type" "mov_reg,mov_shift,mov_shift_reg")
(not (eq_attr "length" "8")))))
In the two patterns that I change the mov_imm has a length of 4 an hence will still use this reservation.
Thus I don't expect codegen to change at all from this patch but for future scheduling jobs this could make a
This is ok. Well spotted.
Tested arm-none-eabi on qemu.
Ok for trunk?
2014-05-29 Kyrylo Tkachov <email@example.com>
* config/arm/thumb2.md (*thumb2_movhi_insn): Set type of movw
* config/arm/vfp.md (*thumb2_movsi_vfp): Likewise.