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
> > + {
> >
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. */
> +
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