Re: [Patch][PR91504] Inlining misses some logical operation folding

2019-09-03 Thread Jeff Law
On 8/26/19 1:06 AM, kamlesh kumar wrote: > 2019-08-26 Kamlesh Kumar > > * gcc/match.pd: Added simplification > pattern. > * gcc.dg/tree-ssa/pr91504.c: New test. Thanks. I've installed this on the trunk. jeff

Re: [Patch][PR91504] Inlining misses some logical operation folding

2019-08-27 Thread Richard Biener
On Mon, 26 Aug 2019, Segher Boessenkool wrote: > On Mon, Aug 26, 2019 at 02:04:25PM +0200, Richard Biener wrote: > > On Mon, 26 Aug 2019, kamlesh kumar wrote: > > > +/* (~a & b) ^ a --> (a | b) */ > > > +(simplify > > > + (bit_xor:c (bit_and:cs (bit_not @0) @1) @0) > > > + (bit_ior @0 @1)) >

Re: [Patch][PR91504] Inlining misses some logical operation folding

2019-08-26 Thread Segher Boessenkool
On Mon, Aug 26, 2019 at 02:04:25PM +0200, Richard Biener wrote: > On Mon, 26 Aug 2019, kamlesh kumar wrote: > > +/* (~a & b) ^ a --> (a | b) */ > > +(simplify > > + (bit_xor:c (bit_and:cs (bit_not @0) @1) @0) > > + (bit_ior @0 @1)) > > + > > Are you sure? > > (~1804289383 & 846930886) ^ 1804

Re: [Patch][PR91504] Inlining misses some logical operation folding

2019-08-26 Thread Richard Biener
On Mon, 26 Aug 2019, kamlesh kumar wrote: > 2019-08-26 Kamlesh Kumar > > * gcc/match.pd: Added simplification > pattern. > * gcc.dg/tree-ssa/pr91504.c: New test. > > > diff --git a/gcc/match.pd b/gcc/match.pd > index 93dcef9..b3734f8 100644 > --- a

[Patch][PR91504] Inlining misses some logical operation folding

2019-08-26 Thread kamlesh kumar
2019-08-26 Kamlesh Kumar * gcc/match.pd: Added simplification pattern. * gcc.dg/tree-ssa/pr91504.c: New test. diff --git a/gcc/match.pd b/gcc/match.pd index 93dcef9..b3734f8 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -831,6 +831,11 @@ DEFINE_IN