This is the mail archive of the
mailing list for the GCC project.
Re: Fix ARM ldm/stm peephole2 loop
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 05 Aug 2010 08:46:43 +0100
- Subject: Re: Fix ARM ldm/stm peephole2 loop
- References: <4C5A0F50.firstname.lastname@example.org>
On Thu, 2010-08-05 at 03:09 +0200, Bernd Schmidt wrote:
> With -mtune=xscale, arm_gen_load_multiple_1 doesn't actually generate a
> load-multiple for two loads, but single instructions. This causes a
> peephole2 loop where we try to optimize the same instructions over and
> over again.
> Fixed by teaching multiple_operation_profitable_p about this situation. Ok?
+ if (nops <= 2 && arm_tune_xscale && !optimize_size)
It seems wrong to me to have an explicit test for XScale here. Other
cores could surely exist that result in a similar loop. Ie the test
should be on the cause, not on 'it's an xscale'