On Mon, Jun 23, 2014 at 4:38 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, Jun 23, 2014 at 4:23 PM, Marc Glisse <marc.gli...@inria.fr> wrote: >> On Mon, 23 Jun 2014, Richard Biener wrote: >> >>> On Mon, Jun 23, 2014 at 3:32 PM, Prathamesh Kulkarni >>> <bilbotheelffri...@gmail.com> wrote: >>>> >>>> * match.pd: Mark operators in some bitwise and plus-minus >>>> patterns to be commutative. >>> >>> >>> /* A - (A +- B) -> -+ B */ >>> (match_and_simplify >>> - (minus @0 (plus @0 @1)) >>> + (minus @0 (plus:c @0 @1)) >>> (negate @0)) >>> >>> seems pointless >> >> >> Why? a-(a+b) and a-(b+a) are both wanted and don't appear elsewhere in the >> file, no? Should simplify to (negate @1) though. > > Ah, indeed. So here commutation doesn't work because of correctness.
Or rather the pattern is broken from the start ... fixed. Richard. > Richard. > >> -- >> Marc Glisse