Re: [PATCH] Optimize (x * 8) | 5 and (x 3) ^ 3 to use lea (PR target/48688)

2011-06-04 Thread H.J. Lu
On Wed, Apr 20, 2011 at 9:09 AM, Jakub Jelinek ja...@redhat.com wrote: Hi! This splitter allows us to optimize (x {* {2,4,8}, {1,2,3}}) {|,^} y for constant integer y = {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in that case, when the low bits are known to be all 0, is like plus).

Re: [PATCH] Optimize (x * 8) | 5 and (x 3) ^ 3 to use lea (PR target/48688)

2011-04-21 Thread Jakub Jelinek
On Wed, Apr 20, 2011 at 10:27:36AM -0700, Richard Henderson wrote: On 04/20/2011 09:09 AM, Jakub Jelinek wrote: Hi! This splitter allows us to optimize (x {* {2,4,8}, {1,2,3}}) {|,^} y for constant integer y = {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in that case, when the low bits are

[PATCH] Optimize (x * 8) | 5 and (x 3) ^ 3 to use lea (PR target/48688)

2011-04-20 Thread Jakub Jelinek
Hi! This splitter allows us to optimize (x {* {2,4,8}, {1,2,3}}) {|,^} y for constant integer y = {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in that case, when the low bits are known to be all 0, is like plus). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2011-04-20 Jakub