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] Fix pr50717: widening multiply bad code


On Sat, Oct 15, 2011 at 11:27 PM, Andrew Stubbs <ams@codesourcery.com> wrote:
> This patch fixes a bug in which the widening multiply-and-accumulate
> optimization failed to take the intermediate types into account.
>
> The effect of this is that the compiler would do what the programmer
> expected to happen, rather than what the C standard requires to happen (in
> many cases), so obviously this needed fixing. :)
>
> It still needs to optimize the cases where the optimization doesn't actually
> change anything (because it's known that overflow cannot occur), so I don't
> want to completely disallow extends between multiply and plus, and I believe
> this patch achieves this.
>
> OK?

Ok.

THanks,
Richard.

> Andrew
>


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