This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Nov 2016 12:41:19 +0000
- Subject: [Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above
- Auto-submitted: auto-generated
- References: <bug-78546-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546
--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 28 Nov 2016, mpolacek at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546
>
> Marek Polacek <mpolacek at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |mpolacek at gcc dot gnu.org
>
> --- Comment #10 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
> (In reply to Richard Biener from comment #9)
> > Testing
> >
> > diff --git a/gcc/match.pd b/gcc/match.pd
> > index 2d4e019..9e5df64 100644
> > --- a/gcc/match.pd
> > +++ b/gcc/match.pd
> > @@ -1216,6 +1216,13 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
> > (if (cst && !TREE_OVERFLOW (cst))
> > (minus { cst; } @0)))))
> >
> > + /* CST - (CST - A) -> CST - A */
>
> Shouldn't this be just -> -A?
The constants need not be the same.