This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch ARM] Fix combinations of compares with shifts.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]