Re: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-08-01 Thread Jakub Jelinek
On Thu, Jul 31, 2014 at 02:57:34PM +0800, Thomas Preud'homme wrote: > Now that GCC 4.9 branch is opened again and GCC 4.8 branch still open, is > the following backported patch ok for both branches? Ok. > > Ok, what about the following patch and associated ChangeLog entries? > > > > 2014-06-24

RE: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-07-30 Thread Thomas Preud'homme
eud'homme > Sent: Thursday, June 26, 2014 9:11 AM > To: 'Jakub Jelinek' > Cc: Richard Biener; GCC Patches > Subject: RE: [PATCH] Fix PR61375: cancel bswap optimization when value > doesn't fit in a HOST_WIDE_INT > > Ok, what about the following patch and ass

RE: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-07-01 Thread Thomas Preud'homme
E: [PATCH] Fix PR61375: cancel bswap optimization when value > doesn't fit in a HOST_WIDE_INT > > Ok, what about the following patch and associated ChangeLog entries? > > 2014-06-24 Thomas Preud'homme > > PR tree-optimization/61375 > * tree-ssa-math-o

RE: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-25 Thread Thomas Preud'homme
Ok, what about the following patch and associated ChangeLog entries? 2014-06-24 Thomas Preud'homme PR tree-optimization/61375 * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if symbolic number cannot be represented in an unsigned HOST_WIDE_INT.

RE: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-23 Thread Thomas Preud'homme
> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Thomas Preud'homme > > However > although the original comments on struct symbolic_number implies that > there is a mapping between host bytes (the bytes of the symbolic number) > and target bytes, it isn'

RE: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-23 Thread Thomas Preud'homme
> From: Jakub Jelinek [mailto:ja...@redhat.com] > Sent: Monday, June 23, 2014 4:59 PM > > Host could e.g. in theory have CHAR_BIT 32, while target BITS_PER_UNIT 8 > (otherwise bswap pass would give up). sizeof (unsigned HOST_WIDE_INT) > could > very well be 2 in that case. In this case the pass

Re: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-23 Thread Jakub Jelinek
On Mon, Jun 23, 2014 at 04:50:49PM +0800, Thomas Preud'homme wrote: > > Sent: Monday, June 23, 2014 4:37 PM > > > > On Mon, Jun 23, 2014 at 10:18:16AM +0200, Richard Biener wrote: > > > > --- a/gcc/tree-ssa-math-opts.c > > > > +++ b/gcc/tree-ssa-math-opts.c > > > > @@ -1741,6 +1741,8 @@ find_bswap

RE: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-23 Thread Thomas Preud'homme
> From: Jakub Jelinek [mailto:ja...@redhat.com] > Sent: Monday, June 23, 2014 4:37 PM > > On Mon, Jun 23, 2014 at 10:18:16AM +0200, Richard Biener wrote: > > > --- a/gcc/tree-ssa-math-opts.c > > > +++ b/gcc/tree-ssa-math-opts.c > > > @@ -1741,6 +1741,8 @@ find_bswap_1 (gimple stmt, struct > symbol

Re: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-23 Thread Jakub Jelinek
On Mon, Jun 23, 2014 at 10:18:16AM +0200, Richard Biener wrote: > > --- a/gcc/tree-ssa-math-opts.c > > +++ b/gcc/tree-ssa-math-opts.c > > @@ -1741,6 +1741,8 @@ find_bswap_1 (gimple stmt, struct symbolic_number *n, > > int limit) > > if (n->size % BITS_PER_UNIT != 0) > > retur

Re: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-23 Thread Richard Biener
On Fri, Jun 20, 2014 at 12:41 PM, Thomas Preud'homme wrote: >> From: Richard Biener [mailto:richard.guent...@gmail.com] >> Sent: Tuesday, June 10, 2014 5:05 PM >> >> Backports are welcome - please post a patch. >> > > Sorry for the delay. Here you are: > > diff --git a/gcc/testsuite/gcc.c-torture/

RE: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-20 Thread Thomas Preud'homme
> From: Richard Biener [mailto:richard.guent...@gmail.com] > Sent: Tuesday, June 10, 2014 5:05 PM > > Backports are welcome - please post a patch. > Sorry for the delay. Here you are: diff --git a/gcc/testsuite/gcc.c-torture/execute/pr61375.c b/gcc/testsuite/gcc.c-torture/execute/pr61375.c new

Re: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-10 Thread Richard Biener
On Tue, Jun 10, 2014 at 4:30 AM, Thomas Preud'homme wrote: > When analyzing a bitwise AND with a constant as part of a bitwise OR, > the bswap pass stores the constant in a int64_t variable without checking > if it fits. As a result, we get ICE when the constant is an __int128 value. > This affect