[PATCH (7/7)] Mixed-sign multiplies using narrowest mode

Andrew Stubbs ams@codesourcery.com
Tue Jun 28 17:02:00 GMT 2011


On 23/06/11 15:43, Andrew Stubbs wrote:
> Patch 4 introduced support for using signed multiplies to code unsigned
> multiplies in a narrower mode. Patch 5 then introduced support for
> mis-matched input modes.
>
> These two combined mean that there is case where only the smaller of two
> inputs is unsigned, and yet it still tries to user a mode wider than the
> larger, signed input. This is bad because it means unnecessary extends
> and because the wider operation might not exist.
>
> This patch catches that case, and ensures that the smaller, unsigned
> input, is zero-extended to match the mode of the larger, signed input.
>
> Of course, both inputs may still have to be extended to fit the nearest
> available instruction, so it doesn't make a difference every time.
>
> OK?

This update fixes Janis' issue with the testsuite.

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: widening-multiplies-7.patch
Type: text/x-patch
Size: 2431 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110628/d936ebc2/attachment.bin>


More information about the Gcc-patches mailing list