This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch ARM] Fix combinations of compares with shifts.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: ramana dot radhakrishnan at arm dot com
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 Aug 2009 09:59:37 +0100
- Subject: Re: [Patch ARM] Fix combinations of compares with shifts.
- References: <1249995621.25908.136.camel@e200593-lin.cambridge.arm.com>
On Tue, 2009-08-11 at 14:00 +0100, Ramana Radhakrishnan wrote:
> Hi,
>
> This patch enables generation of combinations of compares with shifts
> for the attached testcase. We weren't handling SUBREGs in
> arm_select_cc_mode for cases where we could generate the compare in a
> mode by swapping the operands.
>
> Before this patch for the attached testcase we generated
>
> __mulvsi3:
> @ args = 0, pretend = 0, frame = 0
> @ frame_needed = 0, uses_anonymous_args = 0
> smull r0, r1, r1, r0
> stmfd sp!, {r3, lr}
> mov r3, r0, asr #31
> cmp r3, r1
> ldmeqfd sp!, {r3, pc}
> bl abort
>
>
> After this patch we generate
>
> __mulvsi3:
> @ args = 0, pretend = 0, frame = 0
> @ frame_needed = 0, uses_anonymous_args = 0
> smull r0, r1, r1, r0
> stmfd sp!, {r3, lr}
> cmp r1, r0, asr #31
> ldmeqfd sp!, {r3, pc}
> bl abort
>
> Ok to commit after testing on arm-none-eabi cross for Cortex-A8 on
> qemu-arm ?
>
>
> cheers
> Ramana
>
> 2009-08-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
>
> * gcc.target/arm/combine-cmp-shift.c: New test.
>
> 2009-08-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
>
> * config/arm/arm.c (arm_select_cc_mode): Handle subreg.
>
OK.
R.