This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] arm: Generate MLA and MLS more.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, nickc at redhat dot com, richard dot earnshaw at arm dot com, paul at codesourcery dot com
- Date: Wed, 23 Dec 2009 06:58:14 -0500
- Subject: Re: [patch] arm: Generate MLA and MLS more.
- References: <20091220203751.2DE6C6F6226F@daisy.codesourcery.com> <4B2F481D.9080103@gnu.org>
Hi Paolo,
You mean in find_split_point? Given that the canonicalization
effectively is already reordering the instructions, 90% of the work is
already done.
Yes.
I'm thinking about something like the attached patch; unfortunately
without a testcase for your change, I cannot test it myself. Anyway,
the multiply-accumulate case does not look that much
architecture-dependent.
Thank you for the patch. Your patch works. I just had to fix the obvious
typo in your patch:
if (!set_src && GET_CODE (XEXP (x, 0) == MULT))
Would you mind submitting the patch once the mainline is open again?
By the way, here is the testcase.
int
foo (int *p, int *q)
{
int i;
int accum = 0;
for (i = 0 ; i < 1024; i++)
{
accum += ((*p--) * (*q++));
accum += 4096;
accum >>= 13 ;
}
return accum;
}
Thanks,
Kazu Hirata