> I would have expected (mult @0 integer_zerop) to be folded to @0. > > > > + && !integer_minus_onep (@1) > > And this to (negate @0) > > > > + && !integer_zerop (@3) > > Likewise for op == MULT_EXPR, for division we keep it IIRC, so that check is > OK I guess.
OK, I'll fix it in v2. Thank you! > And I think you want to perform the simplification of (op (mult ... @2) @3) > instead leaving it to re-simplification. I'm not sure about it, because at least it keeps rule simpler and more extensible in my opinion. At most re-simplification could find some other rules based on this constant exposing. If I'm wrong, please, leave another comment and I'll fix this too. Thank you!
