Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-06-22 Thread H.J. Lu
On Fri, Apr 27, 2012 at 9:43 AM, H.J. Lu wrote: > On Fri, Apr 27, 2012 at 3:01 AM, Paolo Bonzini wrote: >> This patch teaches phiopt to look at phis whose arguments are -1 and 0, >> and produce negated setcc statements. >> >> Bootstrapped/regtested x86_64-pc-linux-gnu, together with the patch >>

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-05-02 Thread Richard Guenther
On Tue, 1 May 2012, Richard Henderson wrote: > On 04/27/2012 03:01 AM, Paolo Bonzini wrote: > > This patch teaches phiopt to look at phis whose arguments are -1 and 0, > > and produce negated setcc statements. > > Is this really a win over a COND_EXPR, i.e. (a < b ? -1 : 0)? > > There is quite a

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-05-01 Thread Richard Henderson
On 04/27/2012 03:01 AM, Paolo Bonzini wrote: This patch teaches phiopt to look at phis whose arguments are -1 and 0, and produce negated setcc statements. Is this really a win over a COND_EXPR, i.e. (a < b ? -1 : 0)? There is quite a bit of logic inside the rtl and backend expansion of cmove t

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-04-28 Thread Paolo Bonzini
Il 27/04/2012 18:43, H.J. Lu ha scritto: > On Fri, Apr 27, 2012 at 3:01 AM, Paolo Bonzini wrote: >> This patch teaches phiopt to look at phis whose arguments are -1 and 0, >> and produce negated setcc statements. >> >> Bootstrapped/regtested x86_64-pc-linux-gnu, together with the patch >> for pr53

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-04-27 Thread Paolo Bonzini
> This caused: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53144 Looks like a PPRE bug. Paolo

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-04-27 Thread H.J. Lu
On Fri, Apr 27, 2012 at 3:01 AM, Paolo Bonzini wrote: > This patch teaches phiopt to look at phis whose arguments are -1 and 0, > and produce negated setcc statements. > > Bootstrapped/regtested x86_64-pc-linux-gnu, together with the patch > for pr53138.  Ok for mainline? > > Paolo > > 2012-04-27

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-04-27 Thread Andrew Pinski
On Fri, Apr 27, 2012 at 3:01 AM, Paolo Bonzini wrote: > This patch teaches phiopt to look at phis whose arguments are -1 and 0, > and produce negated setcc statements. > > Bootstrapped/regtested x86_64-pc-linux-gnu, together with the patch > for pr53138.  Ok for mainline? I came up with this same

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-04-27 Thread Richard Guenther
On Fri, 27 Apr 2012, Paolo Bonzini wrote: > This patch teaches phiopt to look at phis whose arguments are -1 and 0, > and produce negated setcc statements. > > Bootstrapped/regtested x86_64-pc-linux-gnu, together with the patch > for pr53138. Ok for mainline? Ok. Thanks, Richard. > Paolo > >