[PATCH (6/7)] More widening multiply-and-accumulate pattern matching

Andrew Stubbs andrew.stubbs@gmail.com
Tue Jun 28 15:49:00 GMT 2011


On 23/06/11 15:42, Andrew Stubbs wrote:
> This patch fixes the case where widening multiply-and-accumulate were
> not recognised because the multiplication itself is not actually widening.
>
> This can happen when you have "DI + SI * SI" - the multiplication will
> be done in SImode as a non-widening multiply, and it's only the final
> accumulate step that is widening.
>
> This was not recognised for two reasons:
>
> 1. is_widening_mult_p inferred the output type from the multiply
> statement, which in not useful in this case.
>
> 2. The inputs to the multiply instruction may not have been converted at
> all (because they're not being widened), so the pattern match failed.
>
> The patch fixes these issues by making the output type explicit, and by
> permitting unconverted inputs (the types are still checked, so this is
> safe).
>
> OK?

This update fixes Janis' testsuite issue.

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


More information about the Gcc-patches mailing list