Re: [PATCH] rs6000: Use xori for HTM builtins and vector compares

2014-09-10 Thread Peter Bergner
On Wed, 2014-09-10 at 14:29 -0500, Segher Boessenkool wrote: > Huh, interesting. I assumed 1-(0_or_1) and (0_or_1)^1 would look the > same to combine, but no. > > With subfic, combine optimises it all to a branch on cr0. With xori, > for some reason combine has a much easier job, and it optimise

Re: [PATCH] rs6000: Use xori for HTM builtins and vector compares

2014-09-10 Thread Segher Boessenkool
On Wed, Sep 10, 2014 at 01:38:13PM -0500, Peter Bergner wrote: > On Tue, 2014-09-09 at 19:28 -0400, David Edelsohn wrote: > > On Tue, Sep 9, 2014 at 3:29 PM, Segher Boessenkool > > > 2014-09-09 Segher Boessenkool > > > > > > * config/rs6000/htm.md (tabort, tabortdc, tabortdci, tabortwc,

Re: [PATCH] rs6000: Use xori for HTM builtins and vector compares

2014-09-10 Thread Peter Bergner
On Tue, 2014-09-09 at 19:28 -0400, David Edelsohn wrote: > On Tue, Sep 9, 2014 at 3:29 PM, Segher Boessenkool > > 2014-09-09 Segher Boessenkool > > > > * config/rs6000/htm.md (tabort, tabortdc, tabortdci, tabortwc, > > tabortwci, tbegin, tcheck, tend, trechkpt, treclaim, tsr): Us

Re: [PATCH] rs6000: Use xori for HTM builtins and vector compares

2014-09-09 Thread David Edelsohn
On Tue, Sep 9, 2014 at 3:29 PM, Segher Boessenkool wrote: > These patterns use subfic now. subfic clobbers the carry. Other code > already preferably uses xor. Let's do the same here. > > Bootstrapped and tested as usual, no regressions. Is this okay to apply? > > > Segher > > > 2014-09-09 Se