Re: [PATCH] Improve stmt folding with match-and-simplify

2015-08-11 Thread Richard Biener
On Tue, 11 Aug 2015, Marek Polacek wrote: > On Wed, Jul 29, 2015 at 09:44:36AM +0200, Richard Biener wrote: > > @@ -3547,6 +3566,27 @@ fold_stmt_1 (gimple_stmt_iterator *gsi, > > && maybe_canonicalize_mem_ref_addr (lhs)) > > changed = true; > > } > > + else > > + { > >

Re: [PATCH] Improve stmt folding with match-and-simplify

2015-08-11 Thread Marek Polacek
On Wed, Jul 29, 2015 at 09:44:36AM +0200, Richard Biener wrote: > @@ -3547,6 +3566,27 @@ fold_stmt_1 (gimple_stmt_iterator *gsi, > && maybe_canonicalize_mem_ref_addr (lhs)) > changed = true; > } > + else > + { > + /* Canonicalize operand order. */ > +

[PATCH] Improve stmt folding with match-and-simplify

2015-07-29 Thread Richard Biener
This avoids regressions when removing the remaining dispatching to fold () from fold_stmt. First, when a valueization is rejected by stmt replacement (for example when propagating an abnormal, where the patch improves some cases here as well) then we fail to do operand order canonicalization on t