Re: [PATCH][RTL] Add simplify pattern for bitfield insertion

2018-11-05 Thread Jeff Law
On 11/5/18 7:44 AM, Richard Biener wrote: > > The PR18041 testcase is about bitfield insertion of the style > > b->bit |= <...> > > where the RMW cycle we end up generating contains redundant > masking and ORing of the original b->bit value. The following > adds a combine pattern in simplify-r

[PATCH][RTL] Add simplify pattern for bitfield insertion

2018-11-05 Thread Richard Biener
The PR18041 testcase is about bitfield insertion of the style b->bit |= <...> where the RMW cycle we end up generating contains redundant masking and ORing of the original b->bit value. The following adds a combine pattern in simplify-rtx to specifically match (X & C) | ((X | Y) & ~C) and