On Tue, Aug 08, 2023 at 03:18:51PM +0200, Richard Biener via Gcc-patches wrote: > On Fri, Aug 4, 2023 at 11:49 PM Drew Ross via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: > > > > Adds a simplification for ((x ^ y) & z) | x to be folded into > > (z & y) | x. Merges this simplification with ((x | y) & z) | x -> (z & y) | > > x > > to prevent duplicate pattern. Tested successfully on x86_64 and x86 targets. > > OK.
Shouldn't (bit_ior:c (bit_and:cs (bit_ior:cs @0 @1) @2) @0) be changed to (bit_ior:c (nop_convert1?:s (bit_and:cs (nop_convert2?:s (op:cs @0 @1)) @2)) @3) rather than (bit_ior:c (nop_convert1? (bit_and:c (nop_convert2? (op:c @0 @1)) @2)) @3) in the patch? I mean the :s modifiers were there for a reason, if some of the intermediates aren't a single use, then the simplification doesn't simplify anything and can even make things larger. Jakub