Re: Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR)

2016-05-11 Thread Marc Glisse
On Wed, 11 May 2016, H.J. Lu wrote: * fold-const.c (fold_binary_loc) [(X ^ Y) & Y]: Remove and merge with... * match.pd ((X & Y) ^ Y): ... this. It caused: FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp2 " & 1;" 0 on x86. Ah, yes, logical_op_short_circuit so I didn

Re: Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR)

2016-05-11 Thread H.J. Lu
On Mon, May 9, 2016 at 11:11 PM, Marc Glisse wrote: > On Fri, 6 May 2016, Marc Glisse wrote: > >> Here they are. I did (X&Y)&X and (X&Y)&(X&Z). The next one would be >> ((X&Y)&Z)&X, but at some point we have to defer to reassoc. >> >> I didn't add the convert?+tree_nop_conversion_p to the existing

Re: Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR)

2016-05-10 Thread Richard Biener
On Tue, May 10, 2016 at 8:11 AM, Marc Glisse wrote: > On Fri, 6 May 2016, Marc Glisse wrote: > >> Here they are. I did (X&Y)&X and (X&Y)&(X&Z). The next one would be >> ((X&Y)&Z)&X, but at some point we have to defer to reassoc. >> >> I didn't add the convert?+tree_nop_conversion_p to the existing

Re: Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR)

2016-05-09 Thread Marc Glisse
On Fri, 6 May 2016, Marc Glisse wrote: Here they are. I did (X&Y)&X and (X&Y)&(X&Z). The next one would be ((X&Y)&Z)&X, but at some point we have to defer to reassoc. I didn't add the convert?+tree_nop_conversion_p to the existing transform I modified. I guess at some point we should make a p

Re: Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR)

2016-05-09 Thread Richard Biener
On Fri, May 6, 2016 at 1:50 PM, Marc Glisse wrote: > On Tue, 3 May 2016, Richard Biener wrote: > >> On Tue, May 3, 2016 at 3:26 PM, Marc Glisse wrote: >>> >>> On Tue, 3 May 2016, Richard Biener wrote: >>> On Tue, May 3, 2016 at 8:36 AM, Marc Glisse wrote: > > > This removes

Re: Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR)

2016-05-08 Thread Marc Glisse
On Fri, 6 May 2016, Marc Glisse wrote: 2016-05-06 Marc Glisse gcc/ * fold-const.c (fold_binary_loc) [(X ^ Y) & Y]: Remove and merge with... * match.pd ((X & Y) ^ Y): ... this. ((X & Y) & Y, (X | Y) | Y, (X ^ Y) ^ Y, (X & Y) & (X & Z), (X | Y) | (X | Z), (X ^ Y

Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR)

2016-05-06 Thread Marc Glisse
On Tue, 3 May 2016, Richard Biener wrote: On Tue, May 3, 2016 at 3:26 PM, Marc Glisse wrote: On Tue, 3 May 2016, Richard Biener wrote: On Tue, May 3, 2016 at 8:36 AM, Marc Glisse wrote: This removes the duplication. I also removed the case (A&B)&(A&C) which is handled by reassoc. And I ne

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-03 Thread Richard Biener
On Tue, May 3, 2016 at 3:26 PM, Marc Glisse wrote: > On Tue, 3 May 2016, Richard Biener wrote: > >> On Tue, May 3, 2016 at 8:36 AM, Marc Glisse wrote: >>> >>> This removes the duplication. I also removed the case (A&B)&(A&C) which >>> is >>> handled by reassoc. And I need 2 NOP checks, for the ca

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-03 Thread Marc Glisse
On Tue, 3 May 2016, Richard Biener wrote: On Tue, May 3, 2016 at 8:36 AM, Marc Glisse wrote: This removes the duplication. I also removed the case (A&B)&(A&C) which is handled by reassoc. And I need 2 NOP checks, for the case where @0 is a constant (that couldn't happen before my patch because

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-03 Thread Richard Biener
On Tue, May 3, 2016 at 8:36 AM, Marc Glisse wrote: > This removes the duplication. I also removed the case (A&B)&(A&C) which is > handled by reassoc. And I need 2 NOP checks, for the case where @0 is a > constant (that couldn't happen before my patch because canonicalization > would put the consta

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-02 Thread Marc Glisse
This removes the duplication. I also removed the case (A&B)&(A&C) which is handled by reassoc. And I need 2 NOP checks, for the case where @0 is a constant (that couldn't happen before my patch because canonicalization would put the constant as second operand). Bootstrap+regtest on powerpc64le

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-02 Thread Richard Biener
On Mon, May 2, 2016 at 11:18 AM, Marc Glisse wrote: > On Mon, 2 May 2016, Richard Biener wrote: > >> On Sat, Apr 30, 2016 at 8:44 PM, Marc Glisse wrote: >>> >>> Hello, >>> >>> this case seemed to be missing in the various X cmp X transformations. It >>> does not change the generated code in the t

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-02 Thread Marc Glisse
On Mon, 2 May 2016, Richard Biener wrote: On Sat, Apr 30, 2016 at 8:44 PM, Marc Glisse wrote: Hello, this case seemed to be missing in the various X cmp X transformations. It does not change the generated code in the testcase. The missing :c is rather trivial. I can commit it separately if y

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-02 Thread Richard Biener
On Sat, Apr 30, 2016 at 8:44 PM, Marc Glisse wrote: > Hello, > > this case seemed to be missing in the various X cmp X transformations. It > does not change the generated code in the testcase. > > The missing :c is rather trivial. I can commit it separately if you prefer. I think it's not missing

Canonicalize X u< X to UNORDERED_EXPR

2016-04-30 Thread Marc Glisse
Hello, this case seemed to be missing in the various X cmp X transformations. It does not change the generated code in the testcase. The missing :c is rather trivial. I can commit it separately if you prefer. Bootstrap+regtest on powerpc64le-unknown-linux-gnu. 2016-05-02 Marc Glisse gc