[patch][ARM] Fix 16-bit -> 64-bit multiply and accumulate

Bernd Schmidt bernds@codesourcery.com
Tue May 3 09:08:00 GMT 2011


On 04/15/2011 12:54 PM, Andrew Stubbs wrote:
> Ping.

Trying to unblock this...

I think the point is that both examples:

long long foolong (long long x, short *a, short *b)
   {
       return x + (long long)*a * (long long)*b;
   }

and


  long long foolong (long long x, short *a, short *b)
  {
      return x + *a * *b;
  }

should produce the same code using the maddhidi pattern, and for that to
happen, simplify_rtx must produce a canonical form of the 16->64 bit
widening multiply. The form that already exists in arm.md looks better
so we should pick that.

I tried to fix it with the patch below, which unfortunately doesn't work
since during combine we don't see the SIGN_EXTEND operations inside the
MULT, but two shift operations instead. Maybe you can complete it from here?


Bernd
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: srtx-widen.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110503/e5256d48/attachment.ksh>


More information about the Gcc-patches mailing list