This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] Obvious fix for PR66828: left shift with undefined behavior in bswap pass
- From: Richard Biener <rguenther at suse dot de>
- To: Thomas Preud'homme <thomas dot preudhomme at arm dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Aug 2015 09:43:43 +0200 (CEST)
- Subject: RE: [PATCH] Obvious fix for PR66828: left shift with undefined behavior in bswap pass
- Authentication-results: sourceware.org; auth=none
- References: <000f01d0c902$58c35be0$0a4a13a0$ at arm dot com> <001001d0c903$91a41980$b4ec4c80$ at arm dot com> <000601d0cfe9$1c051890$540f49b0$ at arm dot com>
On Thu, 6 Aug 2015, Thomas Preud'homme wrote:
> Hi,
>
> > From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> > owner@gcc.gnu.org] On Behalf Of Thomas Preud'homme
> > Sent: Tuesday, July 28, 2015 3:04 PM
> >
> > > From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> > > owner@gcc.gnu.org] On Behalf Of Thomas Preud'homme
> > >
> > > ChangeLog entry is as follows:
> > >
> > > 2015-07-28 Thomas Preud'homme <thomas.preudhomme@arm.com>
> > >
> > > PR tree-optimization/66828
> > > * tree-ssa-math-opts.c (perform_symbolic_merge): Change type
> > of
> > > inc
> > > from int64_t to uint64_t.
>
> Can I backport this change to GCC 5 branch? The patch applies cleanly on
> GCC 5 and shows no regression on a native x86_64-linux-gnu bootstrapped
> GCC and an arm-none-eabi GCC cross-compiler.
YEs.
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index ba37d96..a301c23 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,12 @@
> +2015-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
> +
> + Backport from mainline
> + 2015-07-28 Thomas Preud'homme <thomas.preudhomme@arm.com>
> +
> + PR tree-optimization/66828
> + * tree-ssa-math-opts.c (perform_symbolic_merge): Change type of inc
> + from int64_t to uint64_t.
> +
> 2015-08-03 John David Anglin <danglin@gcc.gnu.org>
>
> PR target/67060
> diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
> index c22a677..c699dcadb 100644
> --- a/gcc/tree-ssa-math-opts.c
> +++ b/gcc/tree-ssa-math-opts.c
> @@ -1856,7 +1856,7 @@ perform_symbolic_merge (gimple source_stmt1, struct symbolic_number *n1,
> the same base (array, structure, ...). */
> if (gimple_assign_rhs1 (source_stmt1) != gimple_assign_rhs1 (source_stmt2))
> {
> - int64_t inc;
> + uint64_t inc;
> HOST_WIDE_INT start_sub, end_sub, end1, end2, end;
> struct symbolic_number *toinc_n_ptr, *n_end;
>
>
> Best regards,
>
> Thomas
>
>
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nuernberg)