RE: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-05-05 Thread Thomas Preud'homme
I found a way to improve the function find_bswap/find_bswap_or_nop and reduce its size. Please hold for the review, I will post an updated version as soon as I finish testing. Best regards, Thomas Preud'homme

RE: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-05-04 Thread Thomas Preud'homme
Please find attached the new version of this patch addressing all your comments. ChangeLog are now as follows: *** gcc/ChangeLog *** 2014-05-04 Thomas Preud'homme PR tree-optimization/54733 * expr.c (get_inner_reference): Add a parameter to control whether a MEM_REF s

Re: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-29 Thread Richard Biener
On Thu, Apr 24, 2014 at 3:34 AM, Thomas Preud'homme wrote: > See updated part 2 of the patch in attachment. Part 1 is unchanged. New > ChangeLog are as follows: > > *** gcc/ChangeLog *** > > 2014-04-23 Thomas Preud'homme > > PR tree-optimization/54733 > * tree-ssa-math-opts.c (

RE: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-24 Thread Thomas Preud'homme
> > Bootstrapped on x86_64-linux-gnu with no testsuite regression. Also did a > arm-none-eabi cross build with no regression after running testsuite via > qemu Forgot to ask if it's ok for trunk. Same question for part 1 and 3. Best regards, Thomas

RE: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-23 Thread Thomas Preud'homme
See updated part 2 of the patch in attachment. Part 1 is unchanged. New ChangeLog are as follows: *** gcc/ChangeLog *** 2014-04-23 Thomas Preud'homme PR tree-optimization/54733 * tree-ssa-math-opts.c (find_bswap_load): New. (find_bswap_1): Add support for memory sourc

Re: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-17 Thread Richard Biener
On Thu, Apr 17, 2014 at 7:19 AM, Thomas Preud'homme wrote: >> From: Richard Biener [mailto:richard.guent...@gmail.com] >> >> With handling only the outermost handled-component and then only a >> selected subset you'll catch many but not all cases. Why not simply >> use get_inner_reference () here

RE: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-16 Thread Thomas Preud'homme
> From: Richard Biener [mailto:richard.guent...@gmail.com] > > With handling only the outermost handled-component and then only a > selected subset you'll catch many but not all cases. Why not simply > use get_inner_reference () here (plus stripping the constant offset > from an innermost MEM_REF

Re: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-15 Thread Richard Biener
On Fri, Apr 4, 2014 at 7:49 AM, Thomas Preud'homme wrote: >> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- >> ow...@gcc.gnu.org] On Behalf Of Rainer Orth >> >> Just omit the { target *-*-* } completely, also a few more times. > > Please find attached an updated patch. @@ -1733,6 +1743,

RE: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-03 Thread Thomas Preud'homme
> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Rainer Orth > > Just omit the { target *-*-* } completely, also a few more times. Please find attached an updated patch. Best regards, Thomas gcc32rm-84.3.2.part2.diff Description: Binary data

RE: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-02 Thread Thomas Preud'homme
> From: Richard Biener [mailto:richard.guent...@gmail.com] > > "More like" isn't enough to answer this - do you have a testcase? (usually > these end up in undefined-overflow and/or conversion-to-sizetype issues) I do. See attachment. This testcase needs to be compiled with patch 2/3 applied. As

Re: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-02 Thread Richard Biener
On Wed, Apr 2, 2014 at 9:04 AM, Thomas Preud'homme wrote: >> From: Marc Glisse [mailto:marc.gli...@inria.fr] >> >> Uh? It does fold a+1-a for me. What it doesn't do is look through the >> definition of b in b-a. Richard+GSoC will supposedly soon provide a >> function that does that. > > Oh right,

RE: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-02 Thread Thomas Preud'homme
> From: Marc Glisse [mailto:marc.gli...@inria.fr] > > Uh? It does fold a+1-a for me. What it doesn't do is look through the > definition of b in b-a. Richard+GSoC will supposedly soon provide a > function that does that. Oh right, it's a bit more complex here since the array index is converted to

Re: [PATCH][2/3] Fix PR54733 Optimize endian independent load/store

2014-04-01 Thread Marc Glisse
On Wed, 2 Apr 2014, Thomas Preud'homme wrote: Note that as it stands the patch does not work for arrays indexed with variable (such a tab[a] || (tab[a+1] << 8)) because fold_const does not fold (a + 1) - a. Uh? It does fold a+1-a for me. What it doesn't do is look through the definition of b