This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix pr50717: widening multiply bad code
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Andrew Stubbs <ams at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 17 Oct 2011 12:43:46 +0200
- Subject: Re: [PATCH] Fix pr50717: widening multiply bad code
- References: <4E99FAB8.8030806@codesourcery.com>
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
>