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

Andrew Stubbs andrew.stubbs@linaro.org
Thu Jun 23 14:51:00 GMT 2011

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 



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

More information about the Gcc-patches mailing list