On Tue, Oct 13, 2015 at 2:18 PM, Marc Glisse <marc.gli...@inria.fr> wrote: > On Tue, 13 Oct 2015, Richard Biener wrote: > >> +/* Simplify ~X & X as zero. */ >> +(simplify >> + (bit_and:c (convert? @0) (convert? (bit_not @0))) >> + (if (tree_nop_conversion_p (type, TREE_TYPE (@0))) > > > The test seems unnecessary for this specific transformation. > >> + { build_zero_cst (TREE_TYPE (@0)); })) > > > I'd rather build_zero_cst (type) directly. > >> +/* (-A) * (-B) -> A * B */ >> +(simplify >> + (mult:c (convert? (negate @0)) (convert? negate_expr_p@1)) >> + (if (tree_nop_conversion_p (type, TREE_TYPE (@0))) >> + (mult (convert @0) (convert (negate @1))))) >> >> this one is ok with using convert1? and convert2? > > > Is it? Maybe if it also checked tree_nop_conversion_p for @1...
Sorry, your comments are of course correct. Neveen, please adjust also according to these comments. Richard. > -- > Marc Glisse