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: Generate MLA and MLS more.


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


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